From 9135544d0aebe6ff31965452470d2dce888758a8 Mon Sep 17 00:00:00 2001 From: kirk0830 <67682086+kirk0830@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:49:30 +0800 Subject: [PATCH] Fix: close and clean the global instance plt in split_btd To suppress the RuntimeWarning about too many figures have been opened. --- dpnegf/negf/split_btd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpnegf/negf/split_btd.py b/dpnegf/negf/split_btd.py index 77e3bdf..33d17d6 100644 --- a/dpnegf/negf/split_btd.py +++ b/dpnegf/negf/split_btd.py @@ -1317,7 +1317,7 @@ def show_blocks(subblocks, input_mat, results_path): plt.ylim(-1.0, input_mat.shape[0] - 0.5) plt.axis('off') plt.savefig(results_path +'/subblocks_HK0.png', dpi=300) - + plt.close() # if __name__ == "__main__": # import doctest