04: Copying of arrays is required
This commit is contained in:
@ -916,7 +916,8 @@
|
||||
"def remains_valid_after_move(x,i,next_position,L):\n",
|
||||
" '''Returns True if replacing x[i] by next_position would yield a valid configuration,\n",
|
||||
" otherwise False.'''\n",
|
||||
" # TODO: Do I need to operate on a copy?\n",
|
||||
" # We need to create a copy as not to alter the original x\n",
|
||||
" # outside this function.\n",
|
||||
" copy_x = np.copy(x)\n",
|
||||
" copy_x[i] = next_position\n",
|
||||
" return disk_config_valid(copy_x, L)"
|
||||
|
||||
Reference in New Issue
Block a user