From 1d57c8dad4bb8a78fe5d84b1a5a4cc87b9a50ff8 Mon Sep 17 00:00:00 2001 From: stoprightthere Date: Mon, 14 Aug 2023 22:47:49 +0300 Subject: [PATCH] Fix E721 do not compare types --- tests/spaces/test_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spaces/test_graph.py b/tests/spaces/test_graph.py index 760c1275..2fea1f12 100644 --- a/tests/spaces/test_graph.py +++ b/tests/spaces/test_graph.py @@ -58,7 +58,7 @@ def run_tests_with_adj(A, L, tol=1e-14, tol_m=1e-7): if sp.issparse(comparison): comparison = comparison.toarray() - if type(comparison) == np.matrix: # bug with lab? + if isinstance(comparison, np.matrix): # bug with lab? assert comparison.all(), "Laplacian does not match." else: assert B.all(comparison), "Laplacian does not match."