 <p>Because of the fact that you only write out the results after the loops have finished, you are only seeing the last result.<br> Also, I would expect 4 results from that data, not 2.<br> You need to write the output on each iteration or store each iteration and then write out the stored values.<br> Try printing <code>res2</code> each time you calculate it and you will see something like this: </p> <pre><code>('Final Results', array([[ 0.44, 0.3 , 6.5 ]])) ('Final Results', array([[ 0.275 , 0.6 , 2.16666667]])) ('Final Results', array([[ 0.32857143, 0.3 , 1.1 ]])) ('Final Results', array([[ 0.25555556, 0.6 , 2.2 ]])) </code></pre>