0
votes

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
arr[:,1] += 1 - Psidom

1 Answers

2
votes

Psidom's comment above worked thanks.

arr[:,1] += 1