def test_zscore(self):
        for n in self.get_n():
            x, y, xm, ym = self.generate_xy_sample(n)

            #reference solution
            zx = (x - x.mean()) / x.std()
            zy = (y - y.mean()) / y.std()

            #validate stats
            assert_allclose(stats.zscore(x), zx, rtol=1e-10)
            assert_allclose(stats.zscore(y), zy, rtol=1e-10)

            #compare stats and mstats
            assert_allclose(stats.zscore(x), stats.mstats.zscore(xm[0:len(x)]),
                            rtol=1e-10)
            assert_allclose(stats.zscore(y), stats.mstats.zscore(ym[0:len(y)]),
                            rtol=1e-10)
dataset/ETHPy150Open scipy/scipy/scipy/stats/tests/test_mstats_basic.py/TestCompareWithStats.test_zscore/original