I'm a beginner to the Python world and hope someone can answer my question. I haven an array and need to access certain indices of elements as below
x = np.random.rand(10)
x
array([ 0.56807058, 0.8404783 , 0.86835717, 0.76030882, 0.40242679,
0.22941009, 0.56842643, 0.94541468, 0.92813747, 0.95980955])
indx = np.where(x < 0.5)
indx
(array([4, 5], dtype=int64),)
However, when I try to access first element with indx[0] it returns array([4, 5], dtype=int64). What I want to do is access elements 4 and 5 inside indx. Thank you for looking into my question and any support.
indx[0]getsarray([4, 5], what do you think will get 4?