code: def test_chi2_contingency_bad_args():
      # Test that "bad" inputs raise a ValueError.
  
      # Negative value in the array of observed frequencies.
      obs = np.array([[-1, 10], [1, 2]])
      assert_raises(ValueError, chi2_contingency, obs)
  
      # The zeros in this will result in zeros in the array
      # of expected frequencies.
      obs = np.array([[0, 1], [0, 1]])
      assert_raises(ValueError, chi2_contingency, obs)
  
      # A degenerate case: `observed` has size 0.
      obs = np.empty((0, 8))
      assert_raises(ValueError, chi2_contingency, obs)
  
file_path: catboost/contrib/python/scipy/py2/scipy/stats/tests/test_contingency.py
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_equal, assert_array_equal, assert_array_almost_equal, assert_approx_equal, assert_allclose
  from pytest import raises
  from scipy.special import xlogy
  from scipy.stats.contingency import margins, expected_freq, chi2_contingency
label_desc: Use image node_id 6 for calling a global function with example usage: test_chi2_contingency_bad_args() without return types