class_docstr: Test that a keyword-based log-probability function instead of
  a positional.
class_docstr_tok: ["Test","that","a","keyword-based","log-probability","function","instead","of","a","positional","."]
code: def test_compute_log_prob_mixture(self):
      names = ["mean1", "var1", "mean2", "var2"]
      # Try different numbers of walkers
      for N in [8, 10, 20]:
          sampler = EnsembleSampler(
              nwalkers=N,
              ndim=len(names),
              log_prob_fn=self.lnpdf_mixture,
              parameter_names=names,
          )
          coords = np.random.rand(N, len(names))
          lnps, _ = sampler.compute_log_prob(coords)
          assert len(lnps) == N
          assert lnps.dtype == np.float64
  
file_path: emcee/src/emcee/tests/unit/test_ensemble.py
imports: import string
  from unittest import TestCase
  import numpy
  import pytest
  from emcee.ensemble import EnsembleSampler, ndarray_to_list_of_dicts
label_desc: Use image node_id 8 for calling the TestNamedParameters obj's underlying member method code with example usage: obj.test_compute_log_prob_mixture() without return types