title: How do I resize an image in Python using scipy.misc.imresize so that it matches the size of another specified image
body: <p>For my code here, there are two images known as "org_content" and "output": </p>
  
  <pre><code>elif cp_mode == 'lum2':
              output = args.output_lum2
              org_content = args.org_content
              org_content = imread(org_content).astype(float)/256
              output = imread(output).astype(float)/256
  
              org_content = rgb2luv(org_content)
              org_content[:,:,0] = output.mean(2)
              output = luv2rgb(org_content)
              output[output&lt;0] = 0
              output[output&gt;1]=1
              imsave(output_a_name, output)
  </code></pre>
  
  <p>I receive an error if there is a size difference between the two images: </p>
  
  <pre><code>Traceback (most recent call last):
    File "lum_transfer.py", line 123, in &lt;module&gt;
      org_content[:,:,0] = output.mean(2)
  ValueError: could not broadcast input array from shape (666,1000) into shape (1024,1536)
  </code></pre>
  
  <p>I need to resize "org_content" so that it matches the length and width of "output". This is because preserving the size/quality of "output" is more important than preserving the size/quality of "org_content". </p>
  
  <p>The rgb2luv and luv2rgb functions are not important to the size difference issue.</p>
  
  <p>I tried using this to fix the problem, but it still resulted in the same error message: </p>
  
  <pre><code>org_content = scipy.misc.imresize(output, org_content.shape)
  </code></pre>
  
  <p>I have also tried: </p>
  
  <pre><code>org_content = img_as_float(scipy.misc.imresize(output, org_content.shape))
  </code></pre>
  
  <p>So what am I doing wrong here, and how do I solve this issue?</p>
  
  <p>I have the following libraries in my script: </p>
  
  <pre><code>import numpy as np
  import argparse
  from skimage import io,transform,img_as_float
  from skimage.io import imread,imsave
  from numpy import eye 
  </code></pre>
  
  <hr>
  
  <p>My full script can be found here: <a href="https://gist.github.com/ProGamerGov/2e7a0fe7a5ef6e117dc0be81df243331" rel="nofollow noreferrer">https://gist.github.com/ProGamerGov/2e7a0fe7a5ef6e117dc0be81df243331</a></p>