code: def test_coerce_float64(self):
      # check that an error is raised if there are nan in
      # the data returned by userfcn
      self.data[0] = np.nan
  
      for method in SCALAR_METHODS:
          if method == "cobyla" and sys.platform == "darwin":
              pytest.xfail("this aborts Python on macOS...")
          elif method == "differential_evolution":
              pytest.raises(
                  RuntimeError,
                  self.mini.scalar_minimize,
                  SCALAR_METHODS[method],
              )
          else:
              pytest.raises(
                  ValueError,
                  self.mini.scalar_minimize,
                  SCALAR_METHODS[method],
              )
  
      pytest.raises(ValueError, self.mini.minimize)
  
      # now check that the fit proceeds if nan_policy is 'omit'
      self.mini.nan_policy = "omit"
      res = self.mini.minimize()
      assert_equal(res.ndata, np.size(self.data, 0) - 1)
  
      for para, true_para in zip(
          res.params.values(), self.p_true.values()
      ):
          check_wo_stderr(para, true_para.value, sig=0.15)
  
imports: import sys
  import unittest
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  import pytest
  from scipy.optimize import rosen_der
  from uncertainties import ufloat
  from lmfit import Minimizer, Parameters, minimize
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import HAS_EMCEE, SCALAR_METHODS, MinimizerResult, coerce_float64
  from lmfit.models import SineModel
label_desc: Use image node_id 6 for calling the CommonMinimizerTest obj's underlying member method code with example usage: obj.test_coerce_float64() without return types