docstr: Test that a warning is raised when n_chains <= n_dims
docstr_tok: ["Test","that","a","warning","is","raised","when","n_chains","<","=","n_dims"]
code: def test_demcmc_warning_on_small_populations(self):
      """Test that a warning is raised when n_chains <= n_dims"""
      with pm.Model() as model:
          pm.Normal("n", mu=0, sigma=1, size=(2, 3))
          with pytest.warns(
              UserWarning, match="more chains than dimensions"
          ):
              pm.sample(
                  draws=5,
                  tune=5,
                  chains=6,
                  step=DEMetropolis(),
                  # make tests faster by not parallelizing; disable convergence warning
                  cores=1,
                  compute_convergence_checks=False,
              )
  
file_path: pymc/tests/sampling/test_population.py
imports: import pytest
  import pymc
  from pymc.step_methods.metropolis import DEMetropolis
label_desc: Use image node_id 2 for calling the TestPopulationSamplers obj's underlying member method code with example usage: obj.test_demcmc_warning_on_small_populations() without return types