Added existing_identifiers function to Dataset.

Added colouring drag'n'drop to DAGPlot in gobrowser module.
This commit is contained in:
2007-07-26 15:45:42 +00:00
parent a45743c31e
commit dc7f7dbde2
2 changed files with 50 additions and 1 deletions

View File

@@ -194,6 +194,12 @@ class Dataset:
for key in idents if self._map[dim].has_key(key)]
return asarray(index)
def existing_identifiers(self, dim, idents):
if not isinstance(idents, list) and not isinstance(idents, set):
raise ValueError("idents needs to be a list/set got: %s" %type(idents))
return [key for key in idents if self._map[dim].has_key(key)]
def copy(self):
""" Returns deepcopy of dataset.
"""