Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

More Numpy

import numpy as np

matrix = np.array([
    [2, 3, 17],
    [27, 1, 10],
])

print(matrix.shape)
print(matrix.sum(axis = 1))
print(matrix.sum(axis = 0))