code: def test_numdifftools_calc_covar_false():
      pytest.importorskip("numdifftools")
      # load data to be fitted
      data = np.loadtxt(
          os.path.join(
              os.path.dirname(__file__),
              "..",
              "examples",
              "test_peak.dat",
          )
      )
      x = data[:, 0]
      y = data[:, 1]
  
      # define the model and initialize parameters
      mod = VoigtModel()
      params = mod.guess(y, x=x)
      params["sigma"].set(min=-np.inf)
  
      # do fit, with leastsq and nelder
      result = mod.fit(y, params, x=x, method="leastsq")
      result_ndt = mod.fit(
          y, params, x=x, method="nelder", calc_covar=False
      )
  
      # assert that fit converged to the same result
      vals = [
          result.params[p].value for p in result.params.valuesdict()
      ]
      vals_ndt = [
          result_ndt.params[p].value
          for p in result_ndt.params.valuesdict()
      ]
      assert_allclose(vals_ndt, vals, rtol=5e-3)
      assert_allclose(result_ndt.chisqr, result.chisqr)
  
      assert result_ndt.covar is None
      assert result_ndt.errorbars is False
  
file_path: lmfit-py/tests/test_covariance_matrix.py
imports: import os
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal
  import pytest
  from lmfit import Parameters, minimize
  from lmfit.lineshapes import exponential
  from lmfit.models import ExponentialModel, LinearModel, VoigtModel
label_desc: Use image node_id 6 for calling a global function with example usage: test_numdifftools_calc_covar_false() without return types