Skip to content

Commit

Permalink
fixed list index
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunqinying committed Oct 23, 2017
1 parent 772da4f commit 997622a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.html
Expand Up @@ -322,10 +322,10 @@ <h3>Counting neighbours</h3>
corresponds to the formula above applied individually to each element. Said
differently, we have <tt class="docutils literal"><span class="pre">(1+(2*Z+3))[i,j]</span> == <span class="pre">(1+(2*Z[i,j]+3))</span></tt> for any i,j.</p>
<p>Ok, so far, so good. Now what happens if we add Z with one of its subpart,
let's say <tt class="docutils literal"><span class="pre">Z[-1:1,-1:1]</span></tt> ?</p>
let's say <tt class="docutils literal"><span class="pre">Z[1:-1,1:-1]</span></tt> ?</p>
<blockquote>
<pre class="doctest-block">
&gt;&gt;&gt; Z + Z[-1:1,-1:1]
&gt;&gt;&gt; Z + Z[1:-1,1:-1]
Traceback (most recent call last):
File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
ValueError: operands could not be broadcast together with shapes (6,6) (4,4)
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -328,9 +328,9 @@ corresponds to the formula above applied individually to each element. Said
differently, we have ``(1+(2*Z+3))[i,j] == (1+(2*Z[i,j]+3))`` for any i,j.

Ok, so far, so good. Now what happens if we add Z with one of its subpart,
let's say ``Z[-1:1,-1:1]`` ?
let's say ``Z[1:-1,1:-1]`` ?

>>> Z + Z[-1:1,-1:1]
>>> Z + Z[1:-1,1:-1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: operands could not be broadcast together with shapes (6,6) (4,4)
Expand Down

0 comments on commit 997622a

Please sign in to comment.