Skip to content

Commit b9537b5

Browse files
committed
do not access __array__() of matrices
1 parent 6402981 commit b9537b5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

nipype/pipeline/plugins/multiproc.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
169169

170170
# Check to see if a job is available
171171
currently_running_jobids = np.flatnonzero(
172-
np.array(self.proc_pending, dtype=bool) & ~self.depidx.sum(axis=0).astype(bool)
173-
)
172+
~self.proc_pending & ~np.sum(self.depidx, axis=0).astype(bool))
174173

175174
# Check available system resources by summing all threads and memory used
176175
busy_memory_gb = 0
@@ -200,10 +199,8 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
200199
free_processors = self.processors - busy_processors
201200

202201
# Check all jobs without dependency not run
203-
jobids = np.flatnonzero((self.proc_done == False) &
204-
(self.depidx.sum(axis=0) == 0).__array__())
205-
# jobids = np.flatnonzero(~np.array(self.proc_done, dtype=bool) &
206-
# (self.depidx.sum(axis=0) == 0))
202+
jobids = np.flatnonzero(
203+
~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool))
207204

208205
# Sort jobs ready to run first by memory and then by number of threads
209206
# The most resource consuming jobs run first

0 commit comments

Comments
 (0)