title: Python: two questions about a "numpy.ndarray"
body: <p>I created a numpy.ndarray with value</p>
  
  <p>import numpy as np
  from numpy import nonzero</p>
  
  <pre><code>data = np.zeros((5, 5))
  data
  array([[ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.]])
  </code></pre>
  
  <p>i wish to change some values with 1</p>
  
  <pre><code>data[0,0] = 1
  data[4,4] = 1
  
  data
  array([[ 1.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  1.]])
  </code></pre>
  
  <p>if i change 0 with 5 using negative values i have</p>
  
  <pre><code>data[-5,-5] = 5
  data[-4,-4] = 5
  
  &gt;&gt;&gt; data
  array([[ 5.,  0.,  0.,  0.,  0.],
         [ 0.,  5.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.],
         [ 0.,  0.,  0.,  0.,  0.]])
  </code></pre>
  
  <p>1- I don't understand why i have not an error message as </p>
  
  <pre><code>&gt;&gt;&gt; data[10,10] = 5
  Traceback (most recent call last):
    File "&lt;interactive input&gt;", line 1, in &lt;module&gt;
  IndexError: index (10) out of range (0&lt;=index&lt;5) in dimension 0
  </code></pre>
  
  <p>2- it's not clear why with data[-5,-5] = 5 and data[-4,-4] = 5 the value 5 is inserted in position 0,0 and 1,1</p>