From 9fbcd9b54be142f814ec3d89f74d03bad159db52 Mon Sep 17 00:00:00 2001 From: Johannes Hjorth Date: Fri, 8 Dec 2023 08:45:03 +0100 Subject: [PATCH] Updated --- snudda/plotting/plot_synapse_distance.py | 1 + snudda/simulate/simulate.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/snudda/plotting/plot_synapse_distance.py b/snudda/plotting/plot_synapse_distance.py index aaa75baef..939439d66 100644 --- a/snudda/plotting/plot_synapse_distance.py +++ b/snudda/plotting/plot_synapse_distance.py @@ -104,6 +104,7 @@ def get_synapse_neighbours(self, neuron_id, input_name, repeats=len(input_soma_distance), axis=0) + # !!! TODO: Work in progress # Then in the parent section diff --git a/snudda/simulate/simulate.py b/snudda/simulate/simulate.py index 9c997250a..ab10f1ae0 100644 --- a/snudda/simulate/simulate.py +++ b/snudda/simulate/simulate.py @@ -1956,8 +1956,10 @@ def clear_neuron(self): for sec in h.allsec(): h.delete_section(sec=sec) - import gc - gc.collect() + if sys.meta_path: + # If sys.meta_path is None, then python is shutting down and this is redundant + import gc + gc.collect() ############################################################################