<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/63644977/91653239-a5881200-eac0-11ea-99f4-73e40b1c0388.jpg"><img src="https://user-images.githubusercontent.com/63644977/91653239-a5881200-eac0-11ea-99f4-73e40b1c0388.jpg" alt="Screenshot_20200830-125652_Chrome (1).jpg" style="max-width: 100%;"></a><br>
Here sum of rows are given as sums of columns and vice versa. Also, I think <code class="notranslate">axis=0</code> should give the value of the sum of the rows since numpy first shows rows and then columns in <code class="notranslate">np.shape()</code> command</p>
<p dir="auto">In this Documention  <a href="https://numpy.org/devdocs/user/absolute_beginners.html" rel="nofollow">https://numpy.org/devdocs/user/absolute_beginners.html</a><br>
Sum of rows of an numpy array is denoted by b.sum(axis=0), but the axis should be equal to 1 for sum of rows and 0 for sum of columns.</p>
<p dir="auto">pleas refer to the screenshot below from the documentation web page.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26023337/85929562-73e1a780-b8d3-11ea-88cd-90ca73d57e85.png"><img src="https://user-images.githubusercontent.com/26023337/85929562-73e1a780-b8d3-11ea-88cd-90ca73d57e85.png" alt="image" style="max-width: 100%;"></a></p>