Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/mc' into mc
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Aug 2, 2024
2 parents 0f5dd3d + efbe942 commit 79cb67d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dev/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
scenarios=p.scenarios.pathway.values.tolist(),
years=[
2020,
#2030,
#2040,
#2050
# 2030,
# 2040,
# 2050
],
variables=vars,
use_distributions=20,
Expand Down
11 changes: 8 additions & 3 deletions pathways/lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from .filesystem_constants import DIR_CACHED_DB, USER_LOGS_DIR
from .lcia import fill_characterization_factors_matrices

from .subshares import (
adjust_matrix_based_on_shares,
find_technology_indices,
Expand Down Expand Up @@ -570,7 +569,10 @@ def _calculate_year(args: tuple):
)

# reorder keys of acts_category_idx_dict based on lca_results.coords["act_category"].values
acts_category_idx_dict = {k: acts_category_idx_dict[k] for k in lca_results.coords["act_category"].values.tolist()}
acts_category_idx_dict = {
k: acts_category_idx_dict[k]
for k in lca_results.coords["act_category"].values.tolist()
}

acts_location_idx_dict = _group_technosphere_indices(
technosphere_indices=technosphere_indices,
Expand All @@ -580,7 +582,10 @@ def _calculate_year(args: tuple):
)

# reorder keys of acts_location_idx_dict based on lca_results.coords["location"].values
acts_location_idx_dict = {k: acts_location_idx_dict[k] for k in lca_results.coords["location"].values.tolist()}
acts_location_idx_dict = {
k: acts_location_idx_dict[k]
for k in lca_results.coords["location"].values.tolist()
}

bar = pyprind.ProgBar(len(regions))
for region in regions:
Expand Down
2 changes: 0 additions & 2 deletions pathways/pathways.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ def __init__(
yaml.full_load(self.data.get_resource("classifications").raw_read())
)



self.lca_results = None
self.lcia_methods = get_lcia_method_names()
self.units = load_units_conversion()
Expand Down

0 comments on commit 79cb67d

Please sign in to comment.