Skip to content

Commit 3566fa4

Browse files
committed
update rest of the notebooks from gh-pages - 2017-07-19 19:41:48
1 parent 3357913 commit 3566fa4

10 files changed

+12778
-17956
lines changed

notebooks/basic_iteration.html

Lines changed: 425 additions & 4889 deletions
Large diffs are not rendered by default.

notebooks/basic_joinnodes.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11799,7 +11799,7 @@ <h1 id="JoinNode">JoinNode<a class="anchor-link" href="#JoinNode">&#182;</a></h1
1179911799
</div>
1180011800
<div class="inner_cell">
1180111801
<div class="text_cell_render border-box-sizing rendered_html">
11802-
<h2 id="Simple-example">Simple example<a class="anchor-link" href="#Simple-example">&#182;</a></h2><p>Let's consider the very simple example depicted at the top of this page:</p>
11802+
<h2 id="Simple-example">Simple example<a class="anchor-link" href="#Simple-example">&#182;</a></h2><p>Let's consider the very simple example depicted at the top of this page (since <code>A</code> is not defined, the cell will crash if you try to run):</p>
1180311803

1180411804
</div>
1180511805
</div>
@@ -11809,7 +11809,7 @@ <h2 id="Simple-example">Simple example<a class="anchor-link" href="#Simple-examp
1180911809
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1181011810
<div class="inner_cell">
1181111811
<div class="input_area">
11812-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">from</span> <span class="nn">nipype</span> <span class="kn">import</span> <span class="n">Node</span><span class="p">,</span> <span class="n">JoinNode</span><span class="p">,</span> <span class="n">Workflow</span>
11812+
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">nipype</span> <span class="k">import</span> <span class="n">Node</span><span class="p">,</span> <span class="n">JoinNode</span><span class="p">,</span> <span class="n">Workflow</span>
1181311813

1181411814
<span class="c1"># Specify fake input node A</span>
1181511815
<span class="n">a</span> <span class="o">=</span> <span class="n">Node</span><span class="p">(</span><span class="n">interface</span><span class="o">=</span><span class="n">A</span><span class="p">(),</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;a&quot;</span><span class="p">)</span>
@@ -11865,8 +11865,8 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1186511865
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1186611866
<div class="inner_cell">
1186711867
<div class="input_area">
11868-
<div class=" highlight hl-ipython2"><pre><span></span><span class="kn">from</span> <span class="nn">nipype</span> <span class="kn">import</span> <span class="n">JoinNode</span><span class="p">,</span> <span class="n">Node</span><span class="p">,</span> <span class="n">Workflow</span>
11869-
<span class="kn">from</span> <span class="nn">nipype.interfaces.utility</span> <span class="kn">import</span> <span class="n">Function</span><span class="p">,</span> <span class="n">IdentityInterface</span>
11868+
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">nipype</span> <span class="k">import</span> <span class="n">JoinNode</span><span class="p">,</span> <span class="n">Node</span><span class="p">,</span> <span class="n">Workflow</span>
11869+
<span class="kn">from</span> <span class="nn">nipype.interfaces.utility</span> <span class="k">import</span> <span class="n">Function</span><span class="p">,</span> <span class="n">IdentityInterface</span>
1187011870
</pre></div>
1187111871

1187211872
</div>
@@ -11879,8 +11879,8 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1187911879
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1188011880
<div class="inner_cell">
1188111881
<div class="input_area">
11882-
<div class=" highlight hl-ipython2"><pre><span></span><span class="c1"># Create iteration node</span>
11883-
<span class="kn">from</span> <span class="nn">nipype</span> <span class="kn">import</span> <span class="n">IdentityInterface</span>
11882+
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Create iteration node</span>
11883+
<span class="kn">from</span> <span class="nn">nipype</span> <span class="k">import</span> <span class="n">IdentityInterface</span>
1188411884
<span class="n">iternode</span> <span class="o">=</span> <span class="n">Node</span><span class="p">(</span><span class="n">IdentityInterface</span><span class="p">(</span><span class="n">fields</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;number_id&#39;</span><span class="p">]),</span>
1188511885
<span class="n">name</span><span class="o">=</span><span class="s2">&quot;iternode&quot;</span><span class="p">)</span>
1188611886
<span class="n">iternode</span><span class="o">.</span><span class="n">iterables</span> <span class="o">=</span> <span class="p">[(</span><span class="s1">&#39;number_id&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">9</span><span class="p">])]</span>
@@ -11896,9 +11896,9 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1189611896
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1189711897
<div class="inner_cell">
1189811898
<div class="input_area">
11899-
<div class=" highlight hl-ipython2"><pre><span></span><span class="c1"># Create join node - compute square root for each element in the joined list</span>
11899+
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Create join node - compute square root for each element in the joined list</span>
1190011900
<span class="k">def</span> <span class="nf">compute_sqrt</span><span class="p">(</span><span class="n">numbers</span><span class="p">):</span>
11901-
<span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">sqrt</span>
11901+
<span class="kn">from</span> <span class="nn">math</span> <span class="k">import</span> <span class="n">sqrt</span>
1190211902
<span class="k">return</span> <span class="p">[</span><span class="n">sqrt</span><span class="p">(</span><span class="n">e</span><span class="p">)</span> <span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">numbers</span><span class="p">]</span>
1190311903

1190411904
<span class="n">joinnode</span> <span class="o">=</span> <span class="n">JoinNode</span><span class="p">(</span><span class="n">Function</span><span class="p">(</span><span class="n">input_names</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;numbers&#39;</span><span class="p">],</span>
@@ -11919,7 +11919,7 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1191911919
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1192011920
<div class="inner_cell">
1192111921
<div class="input_area">
11922-
<div class=" highlight hl-ipython2"><pre><span></span><span class="c1"># Create the workflow and run it</span>
11922+
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1"># Create the workflow and run it</span>
1192311923
<span class="n">joinflow</span> <span class="o">=</span> <span class="n">Workflow</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">&#39;joinflow&#39;</span><span class="p">)</span>
1192411924
<span class="n">joinflow</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="n">iternode</span><span class="p">,</span> <span class="s1">&#39;number_id&#39;</span><span class="p">,</span> <span class="n">joinnode</span><span class="p">,</span> <span class="s1">&#39;numbers&#39;</span><span class="p">)</span>
1192511925
<span class="n">res</span> <span class="o">=</span> <span class="n">joinflow</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
@@ -11937,12 +11937,12 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1193711937
<div class="prompt"></div>
1193811938

1193911939
<div class="output_subarea output_stream output_stdout output_text">
11940-
<pre>170306-22:38:22,861 workflow INFO:
11940+
<pre>170715-22:55:10,963 workflow INFO:
1194111941
Workflow joinflow settings: [&#39;check&#39;, &#39;execution&#39;, &#39;logging&#39;]
11942-
170306-22:38:22,871 workflow INFO:
11942+
170715-22:55:10,997 workflow INFO:
1194311943
Running serially.
11944-
170306-22:38:22,873 workflow INFO:
11945-
Executing node joinnode in dir: /tmp/tmpm8NCMb/joinflow/joinnode
11944+
170715-22:55:10,999 workflow INFO:
11945+
Executing node joinnode in dir: /tmp/tmp0mqxl90s/joinflow/joinnode
1194611946
</pre>
1194711947
</div>
1194811948
</div>
@@ -11966,7 +11966,7 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1196611966
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1196711967
<div class="inner_cell">
1196811968
<div class="input_area">
11969-
<div class=" highlight hl-ipython2"><pre><span></span><span class="n">res</span><span class="o">.</span><span class="n">nodes</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">result</span><span class="o">.</span><span class="n">outputs</span>
11969+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">res</span><span class="o">.</span><span class="n">nodes</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">result</span><span class="o">.</span><span class="n">outputs</span>
1197011970
</pre></div>
1197111971

1197211972
</div>
@@ -11998,7 +11998,7 @@ <h2 id="More-realistic-example">More realistic example<a class="anchor-link" hre
1199811998
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
1199911999
<div class="inner_cell">
1200012000
<div class="input_area">
12001-
<div class=" highlight hl-ipython2"><pre><span></span><span class="n">res</span><span class="o">.</span><span class="n">nodes</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">inputs</span>
12001+
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">res</span><span class="o">.</span><span class="n">nodes</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">inputs</span>
1200212002
</pre></div>
1200312003

1200412004
</div>

0 commit comments

Comments
 (0)