Skip to content

Commit a40eb3b

Browse files
committed
restore those __array__()
1 parent c7fbb61 commit a40eb3b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nipype/pipeline/plugins/base.py

Lines changed: 3 additions & 2 deletions
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) == 0))
364+
~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__())
365365

366366
if len(jobids) > 0:
367367
# send all available jobs
@@ -478,7 +478,8 @@ def _remove_node_dirs(self):
478478
"""Removes directories whose outputs have already been used up
479479
"""
480480
if str2bool(self._config['execution']['remove_node_directories']):
481-
for idx in np.nonzero(np.sum(self.refidx, axis=1) == 0)[0]:
481+
for idx in np.nonzero(
482+
(self.refidx.sum(axis=1) == 0).__array__())[0]:
482483
if idx in self.mapnodesubids:
483484
continue
484485
if self.proc_done[idx] and (not self.proc_pending[idx]):

nipype/pipeline/plugins/multiproc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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) == 0))
203+
~self.proc_done & (self.depidx.sum(axis=0) == 0).__array__())
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)