21from numpy.testing
import assert_allclose
29 with pytest.raises(AssertionError):
33 g = np.array([[7, 1], [1, 1]])
35 with pytest.raises(AssertionError):
40 assert len(xx) == len(yy)
43 for i
in range(len(xx)):
44 xy = np.array([xx[i], yy[i]])
45 mu.append(xy @ g @ xy)
47 assert len(mu) == len(xx)
49 assert_allclose(mu, mu_max, rtol=1e-5)
52if __name__ ==
"__main__":
53 args = sys.argv[1:]
or [
"-v",
"-rs",
"--junit-xml=junit-metric_utils.xml"]
54 sys.exit(pytest.main(args=[__file__] + args))
def mismatch_ellipse(g, mu_max, tol=0.001)
Return points plotting the mismatch ellipse of a metric.
def test_mismatch_ellipse()