-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Every time I input my code, the model forcibly modifies it into the following code, and then the generated test cases no longer match my original code.
This is my code
def jacobi(u, f, dx, Nx, Ny, itmax): # 9
x = np.zeros(Nx * Ny) # 10
for j in range(Ny): # 11
for i in range(Nx): # 12
x[i + j * Nx] = u[i + j * Nx] # 13
for it in range(itmax): # 14
for j in range(1, Ny - 1): # 15
for i in range(1, Nx - 1): # 16
x[i + j * Nx] = 0.25 * (x[(i - 1) + j * Nx] # 17
+ x[(i + 1) + j * Nx] # 18
+ x[i + (j - 1) * Nx] # 19
+ x[i + (j + 1) * Nx] # 20
- dx * dx * f[i + j * Nx]) # 21
return x # 22
But in the model, it was changed to the code shown in the image.

Metadata
Metadata
Assignees
Labels
No labels