def _getSimplePatterns(numOnes, numPatterns):
 numCols = (numOnes * numPatterns)
 p = []
 for i in xrange(numPatterns):
  x = numpy.zeros(numCols, dtype='float32')
  x[(i * numOnes):((i + 1) * numOnes)] = 1
  p.append(x)
 return p

def _getSimplePatterns ( numOnes , numPatterns ) : numCols = ( numOnes * numPatterns ) p = [ ] for i in xrange ( numPatterns ) : x = numpy . zeros ( numCols , dtype = 'float32' ) x [ ( i * numOnes ) : ( ( i + 1 ) * numOnes ) ] = 1 p . append ( x ) return p
very simple patterns .