diff --git a/larch/model/controller.pyx b/larch/model/controller.pyx index 1df6002a..13d3f4ce 100644 --- a/larch/model/controller.pyx +++ b/larch/model/controller.pyx @@ -1322,8 +1322,10 @@ cdef class Model5c(AbstractChoiceModel): from .tree import NestingTree g = NestingTree(root_id=root_id) + # print(root_id) if alternative_names is None: for a in alternative_codes: + # print(a) g.add_node(a) else: for a, name in zip(alternative_codes, alternative_names): diff --git a/larch/numba/data_arrays.py b/larch/numba/data_arrays.py index d1e18be6..597495fb 100755 --- a/larch/numba/data_arrays.py +++ b/larch/numba/data_arrays.py @@ -101,6 +101,7 @@ def prepare_data( if float_dtype is None: float_dtype = np.float64 log.debug(f"building dataset from datashare coords: {datasource.coords}") + log.debug("dkjfakljdlksajf") model_dataset = Dataset( coords=datasource.coords, ) @@ -114,11 +115,19 @@ def prepare_data( from .model import NumbaModel # avoid circular import if isinstance(request, NumbaModel): - alts = request.graph.elemental_names() + alts = request.graph.elemental_names() # these are wrong, they droop the zero index alt_dim = model_dataset.dc.ALTID or _ALTID if model_dataset.dc.ALTID not in model_dataset.coords: model_dataset.coords[alt_dim] = DataArray(list(alts.keys()), dims=(alt_dim,)) - if 'alt_names' not in model_dataset.coords: + if 'alt_names' not in model_dataset.coords: # could we supply this manually? + # display(alts) + # print(alt_dim, len(alts)) + # WAS HERE + # print(model_dataset.coords) + # print(alt_dim) + # print(alts) + # print(model_dataset.coords) + print(len(list(alts.values())), alt_dim) model_dataset.coords['alt_names'] = DataArray(list(alts.values()), dims=(alt_dim,)) request = request.required_data()