Unverified Commit 337904d6 authored by Guillaume Anciaux's avatar Guillaume Anciaux
Browse files

typo correction in lecture of week4

parent 82e86b83
......@@ -414,7 +414,7 @@ div.slide{
<span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="o">+</span><span class="n">n</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="o">*</span><span class="n">n</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="nb">print</span><span class="p">((</span><span class="n">m</span><span class="o">-</span><span class="n">n</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span><span class="p">))</span>
<span class="nb">print</span><span class="p">((</span><span class="n">m</span><span class="o">-</span><span class="n">n</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
</pre></div>
</div>
......@@ -439,8 +439,8 @@ div.slide{
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
<pre>[[0.3378656 0.0313648 0.09493196]
[0.28114122 0.57254829 0.88136671]]
<pre>[[0.69565768 0.68607075 0.48785942]
[0.97216364 0.20613875 0.32019152]]
(2, 3) &lt;class &#39;tuple&#39;&gt;
</pre>
</div>
......@@ -453,6 +453,7 @@ div.slide{
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="flatten"><a href="https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ndarray.flatten.html">flatten</a><a class="anchor-link" href="#flatten">&#182;</a></h2><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
<span class="c1"># makes a flat copy of m</span>
<span class="n">flat</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">flatten</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="n">flat</span><span class="o">.</span><span class="n">shape</span><span class="p">,</span> <span class="n">flat</span><span class="p">)</span>
</pre></div>
......@@ -464,9 +465,9 @@ div.slide{
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
<pre>[[0.3378656 0.0313648 0.09493196]
[0.28114122 0.57254829 0.88136671]]
(6,) [0.3378656 0.0313648 0.09493196 0.28114122 0.57254829 0.88136671]
<pre>[[0.69565768 0.68607075 0.48785942]
[0.97216364 0.20613875 0.32019152]]
(6,) [0.69565768 0.68607075 0.48785942 0.97216364 0.20613875 0.32019152]
</pre>
</div>
</div>
......@@ -475,7 +476,8 @@ div.slide{
</div><div class="full" style="width: 100%; float: left">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="reshape"><a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html#numpy.reshape">reshape</a><a class="anchor-link" href="#reshape">&#182;</a></h2><div class="highlight"><pre><span></span><span class="n">reshaped</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span>
<h2 id="reshape"><a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.html#numpy.reshape">reshape</a><a class="anchor-link" href="#reshape">&#182;</a></h2><div class="highlight"><pre><span></span><span class="c1"># makes a reshaped view of m</span>
<span class="n">reshaped</span> <span class="o">=</span> <span class="n">m</span><span class="o">.</span><span class="n">reshape</span><span class="p">((</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span>
<span class="nb">print</span><span class="p">(</span><span class="n">reshaped</span><span class="p">)</span>
</pre></div>
......@@ -486,9 +488,9 @@ div.slide{
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
<pre>[[0.3378656 0.0313648 ]
[0.09493196 0.28114122]
[0.57254829 0.88136671]]
<pre>[[0.69565768 0.68607075]
[0.48785942 0.97216364]
[0.20613875 0.32019152]]
</pre>
</div>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment