I need to understand the error i have view all the shapes of R and df1 respectively (2265, 2),(4616, 6) as described in the error traceback the error comes from the test pert in the loop for which is not understood. i restarted calculating the values of actions according to R from 2265
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-2-62513555e96b> in <module>()
140 print(R.shape)
141
--> 142 main()
143
144
<ipython-input-2-62513555e96b> in main()
131 #test
132 for i in range (2265,4615,1):
--> 133 if(R[i-1,0]>R[i-1,1]):
134 action[i]=1
135 else:
IndexError: too many indices for array
all works well in the first part below:
#test
for i in range (2265,4615,1):
if(R[i-1,0]>R[i-1,1]):
action[i]=1
else:
action[i]=0
N = number_update(action,2265,4615)
RHO = Rhoo(action,2265,4615)
R = reward_max(action,2265,4615)
print(R.shape)
main()