def convertPermanences(sourceSP, destSP):
 numColumns = sourceSP.getNumColumns()
 numInputs = sourceSP.getNumInputs()
 for i in xrange(numColumns):
  potential = numpy.zeros(numInputs).astype(uintType)
  sourceSP.getPotential(i, potential)
  destSP.setPotential(i, potential)
  perm = numpy.zeros(numInputs).astype(realType)
  sourceSP.getPermanence(i, perm)
  destSP.setPermanence(i, perm)

def convertPermanences ( sourceSP , destSP ) : numColumns = sourceSP . getNumColumns ( ) numInputs = sourceSP . getNumInputs ( ) for i in xrange ( numColumns ) : potential = numpy . zeros ( numInputs ) . astype ( uintType ) sourceSP . getPotential ( i , potential ) destSP . setPotential ( i , potential ) perm = numpy . zeros ( numInputs ) . astype ( realType ) sourceSP . getPermanence ( i , perm ) destSP . setPermanence ( i , perm )
transfer the permanences from source to dest sps .