I'm a beginner in Python and I'm having a hard time doing the following:
I have 1 vector with the following values:
- position = [34.53, 32.64, 44.20, 43.41]
These values are given by the Euclidean distance of the following coordinates:
- coordinates = [29, 83, 61, 70, 29, 83, 50, 58, 29, 83, 64, 56, 29, 83, 71, 72]
Every 4 indices of the coordinate vector corresponds to 1 index of the position vector.
- For example: The value [34.53] of the position vector corresponds to the values [29, 83, 61, 70] of the coordinate vector.
==================
What I want to do is the following:
When a value of my position is greater than 40.00, I must modify the corresponding coordinates in the coordinates vector by other values defined at random.
For example:
- I have the following vectors:
position = [40.51, 30.52, 30.31]
Coordinates = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]
- I found a value greater than 40.00 in the position vector.
position = [ 40.51 , 30.52, 30.31)
- That correspond to these 4 indexes of the coordinate vector.
Coordinates = [ 10, 20, 30, 40 , 50, 60, 70, 80, 90, 100, 110, 120]
- I need to replace the coordinate vector values with these:
Coordinates = 200, 130, 67, 31 , 50, 60, 70, 80, 90, 100, 110, 120]
=================
I'm sorry if it's not very clear yet, I've tried to be as educational as possible.
I ask you to help me, I really do not know how I can resolve this. Sounds simple to me, but I'm still a beginner.
I am very grateful to those who are willing to help me.