Skip to content

Commit 00e3c7c

Browse files
committed
fix: node vars containing flow vars
1 parent 352285e commit 00e3c7c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pownet/data_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,11 @@ def parse_node_variables(
300300

301301
node_var_pattern = r"(\w+)\[(.+),(\d+)\]"
302302
current_node_vars = solution[solution["varname"].str.match(node_var_pattern)].copy()
303+
303304
# Flow should not be included in the node variables
304-
current_node_vars = current_node_vars[current_node_vars["vartype"] != "flow"]
305+
current_node_vars = current_node_vars[
306+
~current_node_vars["vartype"].isin(["flow_fwd", "flow_bwd"])
307+
]
305308

306309
current_node_vars[["node", "timestep"]] = current_node_vars["varname"].str.extract(
307310
node_var_pattern, expand=True

0 commit comments

Comments
 (0)