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_asserts(self):
      # ndim name mismatch
      with pytest.raises(AssertionError):
          _ = EnsembleSampler(
              nwalkers=10,
              ndim=len(self.names) - 1,
              log_prob_fn=self.lnpdf,
              parameter_names=self.names,
          )
  
      # duplicate names
      with pytest.raises(AssertionError):
          _ = EnsembleSampler(
              nwalkers=10,
              ndim=3,
              log_prob_fn=self.lnpdf,
              parameter_names=["a", "b", "a"],
          )
  
      # vectorize turned on
      with pytest.raises(AssertionError):
          _ = EnsembleSampler(
              nwalkers=10,
              ndim=len(self.names),
              log_prob_fn=self.lnpdf,
              parameter_names=self.names,
              vectorize=True,
          )
  
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 6 for calling the TestNamedParameters obj's underlying member method code with example usage: obj.test_asserts() without return types