title: Numpy array to replace a for loop
body: <p>Let's say I have an array A[i,j] and I want to compute a new quantity B[i,j] by doing something like:</p>
  
  <pre><code>for i in arange(1, n):
      B[i,j+1] = a*A[i-1,j] + b*A[i,j]+ c*A[i+1,j]
  </code></pre>
  
  <p>What numpy functionality can I use to turn this into a pure array operation? </p>
  
  <p>I was thinking of np.cumprod but it's unclear how to incorporate the coefficients into the calculation. </p>
  
  <p>A.shape will be (n+1, j). </p>