title: Simple adding two arrays using numpy in python?
body: <p>This might be a simple question. However, I wanted to get some clarifications of how the following code works.</p>
  
  <pre><code>a = np.arange(8)
  a
  array([1,2,3,4,5,6,7])
  Example Function = a[0:-1]+a[1:]/2.0
  </code></pre>
  
  <p>In the Example Function, I want to draw your attention to the plus sign between the array <code>a[0:-1]+a[1:]</code>. How does that work? What does that look like?</p>
  
  <p>For instance, is the plus sign (addition) adding the first index of each array? (e.g <code>1+2</code>) or add everything together? (e.g <code>1+2+2+3+3+4+4+5+5+6+6+7</code>)</p>
  
  <p>Then, I assume <code>/2.0</code> is just dividing it by <code>2</code>...</p>