Skip to content

Commit c7fbb61

Browse files
committed
do not access __array__() of matrices (revise)
1 parent 9a609b6 commit c7fbb61

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
361361
break
362362
# Check to see if a job is available
363363
jobids = np.flatnonzero(
364-
~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool))
364+
~self.proc_done & (np.sum(self.depidx, axis=0) == 0))
365365

366366
if len(jobids) > 0:
367367
# send all available jobs

nipype/pipeline/plugins/multiproc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +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-
~self.proc_pending & ~np.sum(self.depidx, axis=0).astype(bool))
172+
~self.proc_pending & (np.sum(self.depidx, axis=0) == 0))
173173

174174
# Check available system resources by summing all threads and memory used
175175
busy_memory_gb = 0
@@ -200,7 +200,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
200200

201201
# Check all jobs without dependency not run
202202
jobids = np.flatnonzero(
203-
~self.proc_done & ~np.sum(self.depidx, axis=0).astype(bool))
203+
~self.proc_done & (np.sum(self.depidx, axis=0) == 0))
204204

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

0 commit comments

Comments
 (0)