Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- mat=np.array([[1,2], [3,4]])
- # sum columns
- np.sum(mat, axis=0)
- # sum rows
- np.sum(mat, axis=1)
- # min of columns
- np.min(mat, axis=0)
- # delete 1st row
- np.delete(mat, 0, axis=0)
- # delete 1st column
- np.delete(mat, 0, axis=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement