def appendimages(im1, im2):
 rows1 = im1.shape[0]
 rows2 = im2.shape[0]
 if (rows1 < rows2):
  im1 = concatenate((im1, zeros(((rows2 - rows1), im1.shape[1]))), axis=0)
 elif (rows1 > rows2):
  im2 = concatenate((im2, zeros(((rows1 - rows2), im2.shape[1]))), axis=0)
 return concatenate((im1, im2), axis=1)

def appendimages ( im1 , im2 ) : rows1 = im1 . shape [ 0 ] rows2 = im2 . shape [ 0 ] if ( rows1 < rows2 ) : im1 = concatenate ( ( im1 , zeros ( ( ( rows2 - rows1 ) , im1 . shape [ 1 ] ) ) ) , axis = 0 ) elif ( rows1 > rows2 ) : im2 = concatenate ( ( im2 , zeros ( ( ( rows1 - rows2 ) , im2 . shape [ 1 ] ) ) ) , axis = 0 ) return concatenate ( ( im1 , im2 ) , axis = 1 )
return a new image that appends the two images side-by-side .