title: How to relocate an element in a matrix to a random empty location in another row?
body: <p>Let's say I have a 5*5 matrix.</p>
  <pre class="lang-py prettyprint-override"><code>[[1. 2. 3. 4. 5.]
   [0. 0. 0. 0. 0.]
   [0. 0. 0. 0. 0.]
   [0. 0. 0. 0. 0.]
   [0. 0. 0. 0. 0]]
  </code></pre>
  <p>For example:</p>
  <p>I want to get '4' but '5' is in front of it. I need to relocate '5' which is unnecessary here and place it in any random available location other than the row it was in earlier.</p>
  <p>so the matrix should look like this after the relocation</p>
  <pre class="lang-py prettyprint-override"><code>[[0. 1. 2. 3. 4.]
   [0. 0. 0. 0. 0.]
   [0. 5. 0. 0. 0.]
   [0. 0. 0. 0. 0.]
   [0. 0. 0. 0. 0.]]
  </code></pre>
  <p>and if I need '3' it should relocate '4' and '5' to random locations.</p>
  <p>please help me with this. Thanks</p>