I have a 2D numpy array [1,2], [3,4], [5,6]. How can I modify the values in the second column (eg. add 1 to each value, so the result would be ([1,3], [3,5], [5,7])?
1 Answer 1
Psidom's comment above worked thanks.
arr[:,1] += 1
Sign up to request clarification or add additional context in comments.
Comments
lang-py
arr[:,1] += 1