title: Create a mapping of elements from two arrays
body: <p>I have two arrays which are outputs of a clustering algorithm. Is there a possibility of an automatic way to find the <strong>associative mapping</strong>.</p>
  
  <p>Consider two label arrays:</p>
  
  <pre><code>array1 = [0,0,1,2,3]
  array2 = [4,4,6,8,7]
  </code></pre>
  
  <p>Visually these look the same, but for a larger label set, I want to find a mapping like <code>{0:4,1:6,2:8,3:7}</code>.</p>
  
  <p>Does Python have any method to do this?</p>
  
  <p>I have looked at <strong>sklearn metrics</strong> for similar solution, no luck yet. Any help would be appreciated.</p>