We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Modelgen SpecifyModel TypeError: apply_along_axis()
@effigies 
SpecifyModel rises an error with the new function from
commit cd49748be5d7a8201496548922d85f63bb4034dc

modelgen.py line 399ff

With numpy 1.8.2 I get
TypeError: apply_along_axis() got an unexpected keyword argument 'source'
Interface SpecifyModel failed to run

Joerg


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nipype/info.py`
Content:
```
1 """ This file contains defines parameters for nipy that we use to fill
2 settings in setup.py, the nipy top-level docstring, and for building the
3 docs.  In setup.py in particular, we exec this file, so it cannot import nipy
4 """
5 from __future__ import print_function, division, unicode_literals, absolute_import
6 
7 import sys
8 
9 # nipype version information.  An empty version_extra corresponds to a
10 # full release.  '.dev' as a version_extra string means this is a development
11 # version
12 # Remove -dev for release
13 __version__ = '1.0.0-dev'
14 
15 
16 def get_nipype_gitversion():
17     """Nipype version as reported by the last commit in git
18 
19     Returns
20     -------
21     None or str
22       Version of Nipype according to git.
23     """
24     import os
25     import subprocess
26     try:
27         import nipype
28         gitpath = os.path.realpath(os.path.join(os.path.dirname(nipype.__file__),
29                                                 os.path.pardir))
30     except:
31         gitpath = os.getcwd()
32     gitpathgit = os.path.join(gitpath, '.git')
33     if not os.path.exists(gitpathgit):
34         return None
35     ver = None
36     try:
37         o, _ = subprocess.Popen('git describe', shell=True, cwd=gitpath,
38                                 stdout=subprocess.PIPE).communicate()
39     except Exception:
40         pass
41     else:
42         ver = o.decode().strip().split('-')[-1]
43     return ver
44 
45 if __version__.endswith('-dev'):
46     gitversion = get_nipype_gitversion()
47     if gitversion:
48         __version__ = '{}+{}'.format(__version__, gitversion)
49 
50 CLASSIFIERS = ['Development Status :: 5 - Production/Stable',
51                'Environment :: Console',
52                'Intended Audience :: Science/Research',
53                'License :: OSI Approved :: Apache Software License',
54                'Operating System :: MacOS :: MacOS X',
55                'Operating System :: POSIX :: Linux',
56                'Programming Language :: Python :: 2.7',
57                'Programming Language :: Python :: 3.4',
58                'Programming Language :: Python :: 3.5',
59                'Programming Language :: Python :: 3.6',
60                'Topic :: Scientific/Engineering']
61 
62 description = 'Neuroimaging in Python: Pipelines and Interfaces'
63 
64 # Note: this long_description is actually a copy/paste from the top-level
65 # README.txt, so that it shows up nicely on PyPI.  So please remember to edit
66 # it only in one place and sync it correctly.
67 long_description = """========================================================
68 NIPYPE: Neuroimaging in Python: Pipelines and Interfaces
69 ========================================================
70 
71 Current neuroimaging software offer users an incredible opportunity to \
72 analyze data using a variety of different algorithms. However, this has \
73 resulted in a heterogeneous collection of specialized applications \
74 without transparent interoperability or a uniform operating interface.
75 
76 *Nipype*, an open-source, community-developed initiative under the \
77 umbrella of NiPy_, is a Python project that provides a uniform interface \
78 to existing neuroimaging software and facilitates interaction between \
79 these packages within a single workflow. Nipype provides an environment \
80 that encourages interactive exploration of algorithms from different \
81 packages (e.g., AFNI, ANTS, BRAINS, BrainSuite, Camino, FreeSurfer, FSL, MNE, \
82 MRtrix, MNE, Nipy, Slicer, SPM), eases the design of workflows within and \
83 between packages, and reduces the learning curve necessary to use different \
84 packages. Nipype is creating a collaborative platform for neuroimaging software \
85 development in a high-level language and addressing limitations of existing \
86 pipeline systems.
87 
88 *Nipype* allows you to:
89 
90 * easily interact with tools from different software packages
91 * combine processing steps from different software packages
92 * develop new workflows faster by reusing common steps from old ones
93 * process data faster by running it in parallel on many cores/machines
94 * make your research easily reproducible
95 * share your processing workflows with the community
96 """
97 
98 # versions
99 NIBABEL_MIN_VERSION = '2.1.0'
100 NETWORKX_MIN_VERSION = '1.9'
101 NUMPY_MIN_VERSION = '1.8.2'
102 SCIPY_MIN_VERSION = '0.14'
103 TRAITS_MIN_VERSION = '4.6'
104 DATEUTIL_MIN_VERSION = '2.2'
105 PYTEST_MIN_VERSION = '3.0'
106 FUTURE_MIN_VERSION = '0.16.0'
107 SIMPLEJSON_MIN_VERSION = '3.8.0'
108 PROV_VERSION = '1.5.0'
109 CLICK_MIN_VERSION = '6.6.0'
110 
111 NAME = 'nipype'
112 MAINTAINER = 'nipype developers'
113 MAINTAINER_EMAIL = 'neuroimaging@python.org'
114 DESCRIPTION = description
115 LONG_DESCRIPTION = long_description
116 URL = 'http://nipy.org/nipype'
117 DOWNLOAD_URL = 'http://github.com/nipy/nipype/archives/master'
118 LICENSE = 'Apache License, 2.0'
119 CLASSIFIERS = CLASSIFIERS
120 AUTHOR = 'nipype developers'
121 AUTHOR_EMAIL = 'neuroimaging@python.org'
122 PLATFORMS = 'OS Independent'
123 MAJOR = __version__.split('.')[0]
124 MINOR = __version__.split('.')[1]
125 MICRO = __version__.replace('-', '.').split('.')[2]
126 ISRELEASE = (len(__version__.replace('-', '.').split('.')) == 3 or
127              'post' in __version__.replace('-', '.').split('.')[-1])
128 VERSION = __version__
129 PROVIDES = ['nipype']
130 REQUIRES = [
131     'nibabel>=%s' % NIBABEL_MIN_VERSION,
132     'networkx>=%s' % NETWORKX_MIN_VERSION,
133     'numpy>=%s' % NUMPY_MIN_VERSION,
134     'python-dateutil>=%s' % DATEUTIL_MIN_VERSION,
135     'scipy>=%s' % SCIPY_MIN_VERSION,
136     'traits>=%s' % TRAITS_MIN_VERSION,
137     'future>=%s' % FUTURE_MIN_VERSION,
138     'simplejson>=%s' % SIMPLEJSON_MIN_VERSION,
139     'prov==%s' % PROV_VERSION,
140     'click>=%s' % CLICK_MIN_VERSION,
141     'funcsigs',
142     'pytest>=%s' % PYTEST_MIN_VERSION,
143     'mock',
144     'pydotplus',
145     'packaging',
146 ]
147 
148 if sys.version_info <= (3, 4):
149     REQUIRES.append('configparser')
150 
151 TESTS_REQUIRES = [
152     'pytest-cov',
153     'codecov'
154 ]
155 
156 EXTRA_REQUIRES = {
157     'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],
158     'tests': TESTS_REQUIRES,
159     'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
160     'profiler': ['psutil'],
161     'duecredit': ['duecredit'],
162     'xvfbwrapper': ['xvfbwrapper'],
163     # 'mesh': ['mayavi']  # Enable when it works
164 }
165 
166 # Enable a handle to install all extra dependencies at once
167 EXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())]
168 
169 STATUS = 'stable'
170
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nipype/info.py b/nipype/info.py
--- a/nipype/info.py
+++ b/nipype/info.py
@@ -98,7 +98,7 @@
 # versions
 NIBABEL_MIN_VERSION = '2.1.0'
 NETWORKX_MIN_VERSION = '1.9'
-NUMPY_MIN_VERSION = '1.8.2'
+NUMPY_MIN_VERSION = '1.9.0'
 SCIPY_MIN_VERSION = '0.14'
 TRAITS_MIN_VERSION = '4.6'
 DATEUTIL_MIN_VERSION = '2.2'

{"golden_diff": "diff --git a/nipype/info.py b/nipype/info.py\n--- a/nipype/info.py\n+++ b/nipype/info.py\n@@ -98,7 +98,7 @@\n # versions\n NIBABEL_MIN_VERSION = '2.1.0'\n NETWORKX_MIN_VERSION = '1.9'\n-NUMPY_MIN_VERSION = '1.8.2'\n+NUMPY_MIN_VERSION = '1.9.0'\n SCIPY_MIN_VERSION = '0.14'\n TRAITS_MIN_VERSION = '4.6'\n DATEUTIL_MIN_VERSION = '2.2'\n", "issue": "Modelgen SpecifyModel TypeError: apply_along_axis()\n@effigies \r\nSpecifyModel rises an error with the new function from\r\ncommit cd49748be5d7a8201496548922d85f63bb4034dc\r\n\r\nmodelgen.py line 399ff\r\n\r\nWith numpy 1.8.2 I get\r\nTypeError: apply_along_axis() got an unexpected keyword argument 'source'\r\nInterface SpecifyModel failed to run\r\n\r\nJoerg\r\n\n", "before_files": [{"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs.  In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import print_function, division, unicode_literals, absolute_import\n\nimport sys\n\n# nipype version information.  An empty version_extra corresponds to a\n# full release.  '.dev' as a version_extra string means this is a development\n# version\n# Remove -dev for release\n__version__ = '1.0.0-dev'\n\n\ndef get_nipype_gitversion():\n    \"\"\"Nipype version as reported by the last commit in git\n\n    Returns\n    -------\n    None or str\n      Version of Nipype according to git.\n    \"\"\"\n    import os\n    import subprocess\n    try:\n        import nipype\n        gitpath = os.path.realpath(os.path.join(os.path.dirname(nipype.__file__),\n                                                os.path.pardir))\n    except:\n        gitpath = os.getcwd()\n    gitpathgit = os.path.join(gitpath, '.git')\n    if not os.path.exists(gitpathgit):\n        return None\n    ver = None\n    try:\n        o, _ = subprocess.Popen('git describe', shell=True, cwd=gitpath,\n                                stdout=subprocess.PIPE).communicate()\n    except Exception:\n        pass\n    else:\n        ver = o.decode().strip().split('-')[-1]\n    return ver\n\nif __version__.endswith('-dev'):\n    gitversion = get_nipype_gitversion()\n    if gitversion:\n        __version__ = '{}+{}'.format(__version__, gitversion)\n\nCLASSIFIERS = ['Development Status :: 5 - Production/Stable',\n               'Environment :: Console',\n               'Intended Audience :: Science/Research',\n               'License :: OSI Approved :: Apache Software License',\n               'Operating System :: MacOS :: MacOS X',\n               'Operating System :: POSIX :: Linux',\n               'Programming Language :: Python :: 2.7',\n               'Programming Language :: Python :: 3.4',\n               'Programming Language :: Python :: 3.5',\n               'Programming Language :: Python :: 3.6',\n               'Topic :: Scientific/Engineering']\n\ndescription = 'Neuroimaging in Python: Pipelines and Interfaces'\n\n# Note: this long_description is actually a copy/paste from the top-level\n# README.txt, so that it shows up nicely on PyPI.  So please remember to edit\n# it only in one place and sync it correctly.\nlong_description = \"\"\"========================================================\nNIPYPE: Neuroimaging in Python: Pipelines and Interfaces\n========================================================\n\nCurrent neuroimaging software offer users an incredible opportunity to \\\nanalyze data using a variety of different algorithms. However, this has \\\nresulted in a heterogeneous collection of specialized applications \\\nwithout transparent interoperability or a uniform operating interface.\n\n*Nipype*, an open-source, community-developed initiative under the \\\numbrella of NiPy_, is a Python project that provides a uniform interface \\\nto existing neuroimaging software and facilitates interaction between \\\nthese packages within a single workflow. Nipype provides an environment \\\nthat encourages interactive exploration of algorithms from different \\\npackages (e.g., AFNI, ANTS, BRAINS, BrainSuite, Camino, FreeSurfer, FSL, MNE, \\\nMRtrix, MNE, Nipy, Slicer, SPM), eases the design of workflows within and \\\nbetween packages, and reduces the learning curve necessary to use different \\\npackages. Nipype is creating a collaborative platform for neuroimaging software \\\ndevelopment in a high-level language and addressing limitations of existing \\\npipeline systems.\n\n*Nipype* allows you to:\n\n* easily interact with tools from different software packages\n* combine processing steps from different software packages\n* develop new workflows faster by reusing common steps from old ones\n* process data faster by running it in parallel on many cores/machines\n* make your research easily reproducible\n* share your processing workflows with the community\n\"\"\"\n\n# versions\nNIBABEL_MIN_VERSION = '2.1.0'\nNETWORKX_MIN_VERSION = '1.9'\nNUMPY_MIN_VERSION = '1.8.2'\nSCIPY_MIN_VERSION = '0.14'\nTRAITS_MIN_VERSION = '4.6'\nDATEUTIL_MIN_VERSION = '2.2'\nPYTEST_MIN_VERSION = '3.0'\nFUTURE_MIN_VERSION = '0.16.0'\nSIMPLEJSON_MIN_VERSION = '3.8.0'\nPROV_VERSION = '1.5.0'\nCLICK_MIN_VERSION = '6.6.0'\n\nNAME = 'nipype'\nMAINTAINER = 'nipype developers'\nMAINTAINER_EMAIL = 'neuroimaging@python.org'\nDESCRIPTION = description\nLONG_DESCRIPTION = long_description\nURL = 'http://nipy.org/nipype'\nDOWNLOAD_URL = 'http://github.com/nipy/nipype/archives/master'\nLICENSE = 'Apache License, 2.0'\nCLASSIFIERS = CLASSIFIERS\nAUTHOR = 'nipype developers'\nAUTHOR_EMAIL = 'neuroimaging@python.org'\nPLATFORMS = 'OS Independent'\nMAJOR = __version__.split('.')[0]\nMINOR = __version__.split('.')[1]\nMICRO = __version__.replace('-', '.').split('.')[2]\nISRELEASE = (len(__version__.replace('-', '.').split('.')) == 3 or\n             'post' in __version__.replace('-', '.').split('.')[-1])\nVERSION = __version__\nPROVIDES = ['nipype']\nREQUIRES = [\n    'nibabel>=%s' % NIBABEL_MIN_VERSION,\n    'networkx>=%s' % NETWORKX_MIN_VERSION,\n    'numpy>=%s' % NUMPY_MIN_VERSION,\n    'python-dateutil>=%s' % DATEUTIL_MIN_VERSION,\n    'scipy>=%s' % SCIPY_MIN_VERSION,\n    'traits>=%s' % TRAITS_MIN_VERSION,\n    'future>=%s' % FUTURE_MIN_VERSION,\n    'simplejson>=%s' % SIMPLEJSON_MIN_VERSION,\n    'prov==%s' % PROV_VERSION,\n    'click>=%s' % CLICK_MIN_VERSION,\n    'funcsigs',\n    'pytest>=%s' % PYTEST_MIN_VERSION,\n    'mock',\n    'pydotplus',\n    'packaging',\n]\n\nif sys.version_info <= (3, 4):\n    REQUIRES.append('configparser')\n\nTESTS_REQUIRES = [\n    'pytest-cov',\n    'codecov'\n]\n\nEXTRA_REQUIRES = {\n    'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],\n    'tests': TESTS_REQUIRES,\n    'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],\n    'profiler': ['psutil'],\n    'duecredit': ['duecredit'],\n    'xvfbwrapper': ['xvfbwrapper'],\n    # 'mesh': ['mayavi']  # Enable when it works\n}\n\n# Enable a handle to install all extra dependencies at once\nEXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())]\n\nSTATUS = 'stable'\n", "path": "nipype/info.py"}], "after_files": [{"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs.  In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import print_function, division, unicode_literals, absolute_import\n\nimport sys\n\n# nipype version information.  An empty version_extra corresponds to a\n# full release.  '.dev' as a version_extra string means this is a development\n# version\n# Remove -dev for release\n__version__ = '1.0.0-dev'\n\n\ndef get_nipype_gitversion():\n    \"\"\"Nipype version as reported by the last commit in git\n\n    Returns\n    -------\n    None or str\n      Version of Nipype according to git.\n    \"\"\"\n    import os\n    import subprocess\n    try:\n        import nipype\n        gitpath = os.path.realpath(os.path.join(os.path.dirname(nipype.__file__),\n                                                os.path.pardir))\n    except:\n        gitpath = os.getcwd()\n    gitpathgit = os.path.join(gitpath, '.git')\n    if not os.path.exists(gitpathgit):\n        return None\n    ver = None\n    try:\n        o, _ = subprocess.Popen('git describe', shell=True, cwd=gitpath,\n                                stdout=subprocess.PIPE).communicate()\n    except Exception:\n        pass\n    else:\n        ver = o.decode().strip().split('-')[-1]\n    return ver\n\nif __version__.endswith('-dev'):\n    gitversion = get_nipype_gitversion()\n    if gitversion:\n        __version__ = '{}+{}'.format(__version__, gitversion)\n\nCLASSIFIERS = ['Development Status :: 5 - Production/Stable',\n               'Environment :: Console',\n               'Intended Audience :: Science/Research',\n               'License :: OSI Approved :: Apache Software License',\n               'Operating System :: MacOS :: MacOS X',\n               'Operating System :: POSIX :: Linux',\n               'Programming Language :: Python :: 2.7',\n               'Programming Language :: Python :: 3.4',\n               'Programming Language :: Python :: 3.5',\n               'Programming Language :: Python :: 3.6',\n               'Topic :: Scientific/Engineering']\n\ndescription = 'Neuroimaging in Python: Pipelines and Interfaces'\n\n# Note: this long_description is actually a copy/paste from the top-level\n# README.txt, so that it shows up nicely on PyPI.  So please remember to edit\n# it only in one place and sync it correctly.\nlong_description = \"\"\"========================================================\nNIPYPE: Neuroimaging in Python: Pipelines and Interfaces\n========================================================\n\nCurrent neuroimaging software offer users an incredible opportunity to \\\nanalyze data using a variety of different algorithms. However, this has \\\nresulted in a heterogeneous collection of specialized applications \\\nwithout transparent interoperability or a uniform operating interface.\n\n*Nipype*, an open-source, community-developed initiative under the \\\numbrella of NiPy_, is a Python project that provides a uniform interface \\\nto existing neuroimaging software and facilitates interaction between \\\nthese packages within a single workflow. Nipype provides an environment \\\nthat encourages interactive exploration of algorithms from different \\\npackages (e.g., AFNI, ANTS, BRAINS, BrainSuite, Camino, FreeSurfer, FSL, MNE, \\\nMRtrix, MNE, Nipy, Slicer, SPM), eases the design of workflows within and \\\nbetween packages, and reduces the learning curve necessary to use different \\\npackages. Nipype is creating a collaborative platform for neuroimaging software \\\ndevelopment in a high-level language and addressing limitations of existing \\\npipeline systems.\n\n*Nipype* allows you to:\n\n* easily interact with tools from different software packages\n* combine processing steps from different software packages\n* develop new workflows faster by reusing common steps from old ones\n* process data faster by running it in parallel on many cores/machines\n* make your research easily reproducible\n* share your processing workflows with the community\n\"\"\"\n\n# versions\nNIBABEL_MIN_VERSION = '2.1.0'\nNETWORKX_MIN_VERSION = '1.9'\nNUMPY_MIN_VERSION = '1.9.0'\nSCIPY_MIN_VERSION = '0.14'\nTRAITS_MIN_VERSION = '4.6'\nDATEUTIL_MIN_VERSION = '2.2'\nPYTEST_MIN_VERSION = '3.0'\nFUTURE_MIN_VERSION = '0.16.0'\nSIMPLEJSON_MIN_VERSION = '3.8.0'\nPROV_VERSION = '1.5.0'\nCLICK_MIN_VERSION = '6.6.0'\n\nNAME = 'nipype'\nMAINTAINER = 'nipype developers'\nMAINTAINER_EMAIL = 'neuroimaging@python.org'\nDESCRIPTION = description\nLONG_DESCRIPTION = long_description\nURL = 'http://nipy.org/nipype'\nDOWNLOAD_URL = 'http://github.com/nipy/nipype/archives/master'\nLICENSE = 'Apache License, 2.0'\nCLASSIFIERS = CLASSIFIERS\nAUTHOR = 'nipype developers'\nAUTHOR_EMAIL = 'neuroimaging@python.org'\nPLATFORMS = 'OS Independent'\nMAJOR = __version__.split('.')[0]\nMINOR = __version__.split('.')[1]\nMICRO = __version__.replace('-', '.').split('.')[2]\nISRELEASE = (len(__version__.replace('-', '.').split('.')) == 3 or\n             'post' in __version__.replace('-', '.').split('.')[-1])\nVERSION = __version__\nPROVIDES = ['nipype']\nREQUIRES = [\n    'nibabel>=%s' % NIBABEL_MIN_VERSION,\n    'networkx>=%s' % NETWORKX_MIN_VERSION,\n    'numpy>=%s' % NUMPY_MIN_VERSION,\n    'python-dateutil>=%s' % DATEUTIL_MIN_VERSION,\n    'scipy>=%s' % SCIPY_MIN_VERSION,\n    'traits>=%s' % TRAITS_MIN_VERSION,\n    'future>=%s' % FUTURE_MIN_VERSION,\n    'simplejson>=%s' % SIMPLEJSON_MIN_VERSION,\n    'prov==%s' % PROV_VERSION,\n    'click>=%s' % CLICK_MIN_VERSION,\n    'funcsigs',\n    'pytest>=%s' % PYTEST_MIN_VERSION,\n    'mock',\n    'pydotplus',\n    'packaging',\n]\n\nif sys.version_info <= (3, 4):\n    REQUIRES.append('configparser')\n\nTESTS_REQUIRES = [\n    'pytest-cov',\n    'codecov'\n]\n\nEXTRA_REQUIRES = {\n    'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],\n    'tests': TESTS_REQUIRES,\n    'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],\n    'profiler': ['psutil'],\n    'duecredit': ['duecredit'],\n    'xvfbwrapper': ['xvfbwrapper'],\n    # 'mesh': ['mayavi']  # Enable when it works\n}\n\n# Enable a handle to install all extra dependencies at once\nEXTRA_REQUIRES['all'] = [val for _, val in list(EXTRA_REQUIRES.items())]\n\nSTATUS = 'stable'\n", "path": "nipype/info.py"}]}