def makeCloneMap(columnsShape, outputCloningWidth, outputCloningHeight=(-1)):
 if (outputCloningHeight < 0):
  outputCloningHeight = outputCloningWidth
 (columnsHeight, columnsWidth) = columnsShape
 numDistinctMasters = (outputCloningWidth * outputCloningHeight)
 a = numpy.empty((columnsHeight, columnsWidth), 'uint32')
 for row in xrange(columnsHeight):
  for col in xrange(columnsWidth):
   a[(row, col)] = ((col % outputCloningWidth) + ((row % outputCloningHeight) * outputCloningWidth))
 return (a, numDistinctMasters)

def makeCloneMap ( columnsShape , outputCloningWidth , outputCloningHeight = ( - 1 ) ) : if ( outputCloningHeight < 0 ) : outputCloningHeight = outputCloningWidth ( columnsHeight , columnsWidth ) = columnsShape numDistinctMasters = ( outputCloningWidth * outputCloningHeight ) a = numpy . empty ( ( columnsHeight , columnsWidth ) , 'uint32' ) for row in xrange ( columnsHeight ) : for col in xrange ( columnsWidth ) : a [ ( row , col ) ] = ( ( col % outputCloningWidth ) + ( ( row % outputCloningHeight ) * outputCloningWidth ) ) return ( a , numDistinctMasters )
make a two-dimensional clone map mapping columns to clone master .