Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoDiepers committed Jul 23, 2024
1 parent 801f621 commit 098e742
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bw2calc/multi_lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,8 @@ def lci_calculation(self) -> None:
"""
count = len(self.dicts.activity)
solutions = spsolve(
self.technosphere_matrix, np.vstack([arr for arr in self.demand_arrays.values()]).T
).reshape(count, -1)
demand_matrix = np.vstack([arr for arr in self.demand_arrays.values()]).T
solutions = spsolve(self.technosphere_matrix, demand_matrix).reshape(count, -1)
self.supply_arrays = {name: arr for name, arr in zip(self.demands, solutions.T)}
# Turn 1-d array into diagonal matrix
self.inventories = mu.SparseMatrixDict(
Expand Down

0 comments on commit 098e742

Please sign in to comment.