code: def test_rvs_gh2069_regression():
      # Regression tests for gh-2069.  In scipy 0.17 and earlier,
      # these tests would fail.
      #
      # A typical example of the broken behavior:
      # >>> norm.rvs(loc=np.zeros(5), scale=np.ones(5))
      # array([-2.49613705, -2.49613705, -2.49613705, -2.49613705, -2.49613705])
      np.random.seed(123)
      vals = stats.norm.rvs(loc=np.zeros(5), scale=1)
      d = np.diff(vals)
      npt.assert_(
          np.all(d != 0),
          "All the values are equal, but they shouldn't be!",
      )
      vals = stats.norm.rvs(loc=0, scale=np.ones(5))
      d = np.diff(vals)
      npt.assert_(
          np.all(d != 0),
          "All the values are equal, but they shouldn't be!",
      )
      vals = stats.norm.rvs(loc=np.zeros(5), scale=np.ones(5))
      d = np.diff(vals)
      npt.assert_(
          np.all(d != 0),
          "All the values are equal, but they shouldn't be!",
      )
      vals = stats.norm.rvs(loc=np.array([[0], [0]]), scale=np.ones(5))
      d = np.diff(vals.ravel())
      npt.assert_(
          np.all(d != 0),
          "All the values are equal, but they shouldn't be!",
      )
  
      assert_raises(
          ValueError,
          stats.norm.rvs,
          [[0, 0], [0, 0]],
          [[1, 1], [1, 1]],
          1,
      )
      assert_raises(
          ValueError, stats.gamma.rvs, [2, 3, 4, 5], 0, 1, (2, 2)
      )
      assert_raises(
          ValueError,
          stats.gamma.rvs,
          [1, 1, 1, 1],
          [0, 0, 0, 0],
          [[1], [2]],
          (4,),
      )
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import numpy.testing
  import pytest
  from pytest import raises
  from scipy._lib._numpy_compat import suppress_warnings
  from scipy.integrate import IntegrationWarning
  from scipy import stats
  from scipy.special import betainc
  from .common_tests import check_normalization, check_moment, check_mean_expect, check_var_expect, check_skew_expect, check_kurt_expect, check_entropy, check_private_entropy, check_entropy_vect_scale, check_edge_support, check_named_args, check_random_state_property, check_meth_dtype, check_ppf_dtype, check_cmplx_deriv, check_pickling, check_rvs_broadcast
  from scipy.stats._distr_params import distcont
label_desc: Use image node_id 7 for calling a global function with example usage: test_rvs_gh2069_regression() without return types