From 0b26656cbad65c92c4ae11cd0681af5ee587d0b1 Mon Sep 17 00:00:00 2001 From: DONNOT Benjamin Date: Mon, 8 Apr 2024 15:06:39 +0200 Subject: [PATCH] silencing another warnings see #81 --- lightsim2grid/newtonpf/newtonpf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightsim2grid/newtonpf/newtonpf.py b/lightsim2grid/newtonpf/newtonpf.py index 59d9496..aa84f68 100644 --- a/lightsim2grid/newtonpf/newtonpf.py +++ b/lightsim2grid/newtonpf/newtonpf.py @@ -39,7 +39,7 @@ def _get_valid_solver(options, Ybus): else: solver = KLUSolverSingleSlack() if KLU_solver_available else SparseLUSolverSingleSlack() - if ~sparse.isspmatrix_csc(Ybus): + if not sparse.isspmatrix_csc(Ybus): Ybus = sparse.csc_matrix(Ybus) if not Ybus.has_canonical_format: