def vectorsFromSeqList(seqList, patternMatrix):
 totalLen = 0
 for seq in seqList:
  totalLen += len(seq)
 vectors = numpy.zeros((totalLen, patternMatrix.shape[1]), dtype='bool')
 vecOffset = 0
 for seq in seqList:
  seq = numpy.array(seq, dtype='uint32')
  for (idx, coinc) in enumerate(seq):
   vectors[vecOffset] = patternMatrix.getRow(int(coinc))
   vecOffset += 1
 return vectors

def vectorsFromSeqList ( seqList , patternMatrix ) : totalLen = 0 for seq in seqList : totalLen += len ( seq ) vectors = numpy . zeros ( ( totalLen , patternMatrix . shape [ 1 ] ) , dtype = 'bool' ) vecOffset = 0 for seq in seqList : seq = numpy . array ( seq , dtype = 'uint32' ) for ( idx , coinc ) in enumerate ( seq ) : vectors [ vecOffset ] = patternMatrix . getRow ( int ( coinc ) ) vecOffset += 1 return vectors
convert a list of sequences of pattern indices .