I have a problem with assigning values to a selected element of an array that I do not understand why it is happening.
I'm programming in pyhton and, although the code is much more complex, the issue I am having can be reproduced with this small code:
Yr = np.arange(0, 10)
Xg = np.arange(0, 10)
Now I want to change the value of an element that I selected as follows:
Yr[Xg>5][2] = 10
... and it does nothing:
In [275]: Yr
Out[275]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
Thank you.
I tried changing the type of assigned value, but it does not work either.