Replace a column in a numpy matrix
<p>I'm trying to inter-change columns from 2 matrices, but my assignment seems to not be doing it.</p>

<pre><code>crom1 = crossover_list[0][0][:,j]
print('c1', crom1)
crom2 = crossover_list[1][0][:,j]
print('c2', crom2)

crossover_list[0][0][:,j] = crom2

print(crossover_list[1][0][:,j])
crossover_list[1][0][:,j] = crom1
print(crossover_list[1][0][:,j])
</code></pre>

<p>And this is what comes out:
<a href="https://i.stack.imgur.com/Z4cY2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Z4cY2.png" alt="enter image description here"></a></p>

<p>Any suggestions?</p>

<p>LE: I also tried the following, with no success:</p>

<pre><code>aux = crossover_list[0][0][:,j]
crossover_list[0][0][:,j] = crossover_list[1][0][:,j]
crossover_list[1][0][:,j] = aux
</code></pre>