diff --git a/pathways/lca.py b/pathways/lca.py index d46968c..e553855 100644 --- a/pathways/lca.py +++ b/pathways/lca.py @@ -142,7 +142,6 @@ def get_lca_matrices( matrix="biosphere_matrix", indices_array=b_indices, data_array=b_data, - flip_array=b_sign, distributions_array=b_distributions, ) diff --git a/pathways/pathways.py b/pathways/pathways.py index d2f97d2..a545850 100644 --- a/pathways/pathways.py +++ b/pathways/pathways.py @@ -932,6 +932,7 @@ def fill_in_result_array(self, results: dict): summed_data = d[..., idx].sum(axis=-1) if idx.size > 0: + try: self.lca_results.loc[ { @@ -946,20 +947,18 @@ def fill_in_result_array(self, results: dict): ] = summed_data except: - print("summed data shape", summed_data.shape) - print( - self.lca_results.loc[ - { - "region": region, - "model": model, - "scenario": scenario, - "year": year, - "act_category": cat, - "location": loc, - "variable": list(variables.keys()), - } - ].shape - ) + # transpose quantile dimension to the penultimate dimension + self.lca_results.loc[ + { + "region": region, + "model": model, + "scenario": scenario, + "year": year, + "act_category": cat, + "location": loc, + "variable": list(variables.keys()), + } + ] = summed_data.transpose(0, 2, 1) def characterize_planetary_boundaries( self,