Using nump.where and np.max how can i find the index which value is >=10 and if the next value is <10 then the previous value is the correct index.
For example below the answer would be index 4 from py and therefore index 4 from tv and px
This is what i have tried:
For example below the answer would be index 4 from py and therefore index 4 from tv and px
This is what i have tried:
tv = np.array([0.6, 0.7, 1.5, 1.6, 1.7, 1.8, 1.9]) px = np.array([2.4, 2.9, 5.7, 6.6, 7.5, 8.4, 9.3]) py = np.array([9.7, 10.1, 10.5, 10.2, 10.1, 9.9, 9.8]) py_values = np.where(py >= 10) max_py_values = np.max(py_values)im stuck on how to write the matching index for tv and px