From f250f5ce1ff5976e3db3473b3393b6bccbec9467 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Sun, 30 May 2021 09:16:42 -0400 Subject: [PATCH] FIX: Set DistributedPluginBase.refidx type correctly --- nipype/pipeline/plugins/base.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index becc6b4364..a33a40aab6 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -417,14 +417,10 @@ def _generate_dependency_list(self, graph): import networkx as nx self.procs, _ = topological_sort(graph) - try: - self.depidx = nx.to_scipy_sparse_matrix( - graph, nodelist=self.procs, format="lil" - ) - except: - self.depidx = nx.to_scipy_sparse_matrix(graph, nodelist=self.procs) - self.refidx = deepcopy(self.depidx) - self.refidx.astype = np.int + self.depidx = nx.to_scipy_sparse_matrix( + graph, nodelist=self.procs, format="lil" + ) + self.refidx = self.depidx.astype(int) self.proc_done = np.zeros(len(self.procs), dtype=bool) self.proc_pending = np.zeros(len(self.procs), dtype=bool)