mainly overhaul of observers, and removal of project singleton
This commit is contained in:
@@ -22,10 +22,11 @@ class Dataset:
|
||||
raise ValueError,"array dims and identifyer mismatch"
|
||||
for axis,(dim_name,ids) in enumerate(def_list):
|
||||
enum_ids = {}
|
||||
if dim_name not in project.c_p.dim_names:
|
||||
dim_name = project.c_p.suggest_dim_name(dim_name)
|
||||
if not ids:
|
||||
ids = self._create_identifiers(axis)
|
||||
#if dim_name not in project.c_p.dim_names:
|
||||
# dim_name = project.c_p.suggest_dim_name(dim_name)
|
||||
if not ids:
|
||||
logger.log('debug','Creating identifiers along: '+dim_name)
|
||||
ids = self._create_identifiers(axis)
|
||||
for num,name in enumerate(ids):
|
||||
enum_ids[name] = num
|
||||
self.ids[dim_name] = enum_ids
|
||||
@@ -70,6 +71,7 @@ class Dataset:
|
||||
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):
|
||||
|
Reference in New Issue
Block a user