Skip to content

Commit

Permalink
Merge branch 'main' of github.com:brightway-lca/bw_timex
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoDiepers committed Jul 11, 2024
2 parents fae5b80 + 128fca9 commit 72c64d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bw_timex/dynamic_biosphere_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def build_dynamic_biosphere_matrix(
if from_timeline:
demand = self.demand_from_timeline(row, original_db)
else:
demand = self.demand_from_technosphere(idx)
demand = self.demand_from_technosphere(idx, process_col_index)

self.lca_obj.redo_lci(demand)

Expand Down Expand Up @@ -232,11 +232,10 @@ def demand_from_timeline(self, row, original_db):
demand[timed_act_id] = amount
return demand

def demand_from_technosphere(self, idx):
def demand_from_technosphere(self, idx, process_col_index):
"""
Returns a demand dict based on the technosphere colummn.
"""
process_col_index = self.activity_dict[idx] # get the matrix column index
technosphere_column = (
self.technosphere_matrix[:, process_col_index].toarray().ravel()
) # 1-d np.array
Expand Down

0 comments on commit 72c64d5

Please sign in to comment.