From 5ebbef78733e9897d9583707fe9fb3776996786b Mon Sep 17 00:00:00 2001 From: "Timothy A. Smith" <tasmith4@illinois.edu> Date: Mon, 27 May 2019 22:08:02 -0500 Subject: [PATCH] change array comparison to use pytest approx --- comparison_fixtures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comparison_fixtures.py b/comparison_fixtures.py index 4d2be8b..fa0cde6 100644 --- a/comparison_fixtures.py +++ b/comparison_fixtures.py @@ -1,4 +1,4 @@ -import numpy.linalg as la +from pytest import approx def arrays(a, b): - assert la.norm(a - b, 2)/la.norm(b) < 1e-5 + assert a == approx(b) -- GitLab