code: def test_kappa4_array_gh13582():
      h = np.array([-0.5, 2.5, 3.5, 4.5, -3])
      k = np.array([-0.5, 1, -1.5, 0, 3.5])
      moments = "mvsk"
      res = np.array(
          [
              [
                  stats.kappa4.stats(h[i], k[i], moments=moment)
                  for i in range(5)
              ]
              for moment in moments
          ]
      )
      res2 = np.array(stats.kappa4.stats(h, k, moments=moments))
      npt.assert_allclose(res, res2)
  
      # https://github.com/scipy/scipy/pull/15250#discussion_r775112913
      h = np.array([-1, -1 / 4, -1 / 4, 1, -1, 0])
      k = np.array([1, 1, 1 / 2, -1 / 3, -1, 0])
      res = np.array(
          [
              [
                  stats.kappa4.stats(h[i], k[i], moments=moment)
                  for i in range(6)
              ]
              for moment in moments
          ]
      )
      res2 = np.array(stats.kappa4.stats(h, k, moments=moments))
      npt.assert_allclose(res, res2)
  
      # https://github.com/scipy/scipy/pull/15250#discussion_r775115021
      h = np.array([-1, -0.5, 1])
      k = np.array([-1, -0.5, 0, 1])[:, None]
      res2 = np.array(stats.kappa4.stats(h, k, moments=moments))
      assert res2.shape == (4, 4, 3)
  
imports: import sys
  import numpy
  import numpy.testing
  import pytest
  from pytest import raises
  from scipy.integrate import IntegrationWarning
  import itertools
  from scipy import stats
  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, check_freezing, check_munp_expect
  from scipy.stats._distr_params import distcont
  from scipy.stats._distn_infrastructure import rv_continuous_frozen
label_desc: Use image node_id 41 for calling a global function with example usage: test_kappa4_array_gh13582() without return types