Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from numpy import ones
- arr = ones((3,3))
- arr[:, 0] += 1
- arr[..., 1] += 2
- #arr
- #array([[2, 3, 1],
- # [2, 3, 1],
- # [2, 3, 1]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement