index can be one of the following forms: an ID, a pair of IDs, or
a numpy index.
If index is a string, it is assumed to be an ID and a
numpy.ndarray
row vector is returned for the corresponding ID.
Note that the ID’s row of dissimilarities is returned, not its
column. If the matrix is symmetric, the two will be identical, but
this makes a difference if the matrix is asymmetric.
If index is a two-tuple of strings, each string is assumed to be
an ID and the corresponding matrix element is returned that
represents the dissimilarity between the two IDs. Note that the
order of lookup by ID pair matters if the matrix is asymmetric: the
first ID will be used to look up the row, and the second ID will be
used to look up the column. Thus, dm['a', 'b']
may not be the
same as dm['b', 'a']
if the matrix is asymmetric.
Otherwise, index will be passed through to
DissimilarityMatrix.data.__getitem__
, allowing for standard
indexing of a numpy.ndarray
(e.g., slicing).