Issue
I want to increase all the array items by 1 i.e from [i,j]
to [i+1,j+1]
. I have shared the expected output.
import numpy as np
I=np.array([[ 0, 2],
[ 0, 3],
[ 0, 5],
[ 1, 6]])
The expected output is
array([[ 1, 3],
[ 1, 4],
[ 1, 6],
[ 2, 7]])
Solution
Try: I = I + 1
That operation will increment each element
Answered By - svfat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.