object selection fix

This commit is contained in:
2006-04-19 18:50:10 +00:00
parent 56dac31529
commit 0eebd9436c
3 changed files with 12 additions and 12 deletions

View File

@@ -68,6 +68,8 @@ class Dataset:
def extract_id_from_index(self,dim_name,index):
"""Returns a set of ids from array/list of indexes."""
dim_ids = self.ids[dim_name]
if type(index)==int:
index = [index]
return set([id for id,ind in dim_ids.items() if ind in index])
def extract_index_from_id(self,dim_name,id):