Skip to content

Multiproc plugin with numpy 1.9.0 #2372

Closed
@divetea

Description

@divetea

Summary

I am trying to use the Multiproc plugin but it does not send the tasks to the workers. I traced the reason for this to a numpy expression in _send_procs_to_workers():
jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1]
in https://github.com/nipy/nipype/blob/master/nipype/pipeline/plugins/multiproc.py (line 216)

Actual behavior

jobids is of type numpy.matrixlib.defmatrix.matrix with shape: (1,1)

Expected behavior

jobids should be of type numpy.ndarray with shape (1,)

I can achieve this behavior with:
jobids = np.asarray(np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1]).flatten()

Then everything is fine and works for all my pipelines.

How to replicate the behavior

I am using numpy version 1.9.0 which is still matching nipype's requirements, isn't it?

Platform details:

{'nibabel_version': '2.1.0', 'sys_executable': '/usr/bin/python', 'networkx_version': '1.11', 'numpy_version': '1.9.0', 'sys_platform': 'linux2', 'sys_version': '2.7.9 (default, Jun 29 2016, 13:08:31) \n[GCC 4.9.2]', 'commit_source': 'repository', 'commit_hash': '8384523', 'pkg_path': '/home/klipsy1.psych.tu-dresden.de/foerster/nipype/nipype', 'nipype_version': '0.14.1-dev+g8384523', 'traits_version': '4.6.0', 'scipy_version': '0.14.0'}
0.14.1-dev+g8384523

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions