I am trying to create a for loop within a for loop, with an if statement with the following code where N and r are both columns of float numbers.
x = math.floor(max(N)*2)
x_1 = np.zeros((x,1),dtype=np.int16)
for i in range (1,x):
for j in range (1, max(N)):
if N[i] = (i-1)/2:
x_1[i] = max(x_1[j], r[i])
The error I am getting here is invalid syntax for the line:
if N[i] = (i-1)/2:
Specifically under the equals sign.