def vectorsFromSeqList(seqList, patternMatrix):
totalLen = <NUM_LIT:0><EOL>for seq in seqList:<EOL><INDENT>totalLen += len(seq)<EOL><DEDENT>vectors = numpy.zeros((totalLen, patternMatrix.shape[<NUM_LIT:1>]), dtype='<STR_LIT:bool>')<EOL>vecOffset = <NUM_LIT:0><EOL>for seq in seqList:<EOL><INDENT>seq = numpy.array(seq, dtype='<STR_LIT>')<EOL>for idx,coinc in enumerate(seq):<EOL><INDENT>vectors[vecOffset] = patternMatrix.getRow(int(coinc))<EOL>vecOffset += <NUM_LIT:1><EOL><DEDENT><DEDENT>return vectors<EOL>
Convert a list of sequences of pattern indices, and a pattern lookup table
    into a an array of patterns

Parameters:
-----------------------------------------------
seq:            the sequence, given as indices into the patternMatrix
patternMatrix:  a SparseMatrix contaning the possible patterns used in
                        the sequence.