code: def test_weightstats_3(self):
      x1_2d, x2_2d = self.x1_2d, self.x2_2d
      w1, w2 = self.w1, self.w2
  
      d1w_2d = DescrStatsW(x1_2d, weights=w1)
      d2w_2d = DescrStatsW(x2_2d, weights=w2)
      x1r_2d = d1w_2d.asrepeats()
      x2r_2d = d2w_2d.asrepeats()
  
      assert_almost_equal(x2r_2d.mean(0), d2w_2d.mean, 14)
      assert_almost_equal(x2r_2d.var(0), d2w_2d.var, 14)
      assert_almost_equal(x2r_2d.std(0), d2w_2d.std, 14)
      assert_almost_equal(np.cov(x2r_2d.T, bias=1), d2w_2d.cov, 14)
      assert_almost_equal(np.corrcoef(x2r_2d.T), d2w_2d.corrcoef, 14)
  
      #        print d1w_2d.ttest_mean(3)
      #        #scipy.stats.ttest is also vectorized
      #        print stats.ttest_1samp(x1r_2d, 3)
      t, p, d = d1w_2d.ttest_mean(3)
      assert_almost_equal([t, p], stats.ttest_1samp(x1r_2d, 3), 11)
      # print [stats.ttest_1samp(xi, 3) for xi in x1r_2d.T]
      cm = CompareMeans(d1w_2d, d2w_2d)
      ressm = cm.ttest_ind()
      resss = stats.ttest_ind(x1r_2d, x2r_2d)
      assert_almost_equal(ressm[:2], resss, 14)
  
imports: import numpy
  from scipy import stats
  import pandas
  from numpy.testing import assert_, assert_almost_equal, assert_allclose
  from statsmodels.stats.weightstats import DescrStatsW, CompareMeans, ttest_ind, ztest, zconfint
  from statsmodels.tools.testing import Holder
label_desc: Use image node_id 4 for calling the TestWeightstats obj's underlying member method code with example usage: obj.test_weightstats_3() without return types