MCPcopy Index your code
hub / github.com/numpy/numpy / test_unit_fweights_and_aweights

Method test_unit_fweights_and_aweights

numpy/lib/tests/test_function_base.py:2662–2680  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2660 assert_raises(ValueError, cov, self.x1, aweights=w)
2661
2662 def test_unit_fweights_and_aweights(self):
2663 assert_allclose(cov(self.x2, fweights=self.frequencies,
2664 aweights=self.unit_weights),
2665 cov(self.x2_repeats))
2666 assert_allclose(cov(self.x1, fweights=self.frequencies,
2667 aweights=self.unit_weights),
2668 self.res2)
2669 assert_allclose(cov(self.x1, fweights=self.unit_frequencies,
2670 aweights=self.unit_weights),
2671 self.res1)
2672 assert_allclose(cov(self.x1, fweights=self.unit_frequencies,
2673 aweights=self.weights),
2674 self.res3)
2675 assert_allclose(cov(self.x1, fweights=self.unit_frequencies,
2676 aweights=3.0 * self.weights),
2677 cov(self.x1, aweights=self.weights))
2678 assert_allclose(cov(self.x1, fweights=self.unit_frequencies,
2679 aweights=self.unit_weights),
2680 self.res1)
2681
2682 @pytest.mark.parametrize("test_type", np_floats)
2683 def test_cov_dtype(self, test_type):

Callers

nothing calls this directly

Calls 2

assert_allcloseFunction · 0.90
covFunction · 0.90

Tested by

no test coverage detected