Python. I cannot figure out why changing one array is affecting another
Go to solution
Solved by Deopwr,
2 minutes ago, aconncep said:It also looks like the variable k is not being used inside the diffuse() method. Are you meaning to assign that instead of 0?
the variable was used in some other code that was not relevant to the question also i managed to fix the problem by using this:
import copy gridN = [[copy.copy(cell_obj) for cell_obj in line] for line in grid]
-
Featured Topics
-
Topics
-
0
-
ave11 ·
Posted in Troubleshooting1 -
2
-
Abstrxction ·
Posted in Storage Devices1 -
2
-
ImServs ·
Posted in Cases and Mods1 -
0
-
ave11 ·
Posted in Troubleshooting6 -
15
-
idk_what.iam.doing ·
Posted in New Builds and Planning5
-
-
play_circle_filled
Latest From GameLinked:
Are you excited for Doom: The Dark Ages? - Gamers 2 Gamers
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now