def getPartitionId(self, i):
if (i < <NUM_LIT:0>) or (i >= self._numPatterns):<EOL><INDENT>raise RuntimeError("<STR_LIT>")<EOL><DEDENT>partitionId = self._partitionIdList[i]<EOL>if partitionId == numpy.inf:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return partitionId<EOL><DEDENT>
Gets the partition id given an index.

:param i: index of partition
:returns: the partition id associated with pattern i. Returns None if no id
    is associated with it.