Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarojhahn committed Aug 9, 2024
2 parents 9a621c9 + c8b6b10 commit 16d14b2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ requirements:
- python
- setuptools
run:
- numpy
- numpy==1.24.4
- pathlib
- pandas
- scipy
Expand All @@ -32,6 +32,8 @@ requirements:
- platformdirs
- fs
- SALib
- cvxopt
- scikit-umfpack
test:
imports:
- pathways
Expand Down
5 changes: 1 addition & 4 deletions pathways/lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,17 +621,14 @@ def _calculate_year(args: tuple):
lca = bc.MultiLCA(
demands=fus,
method_config={"impact_categories": []},
data_objs=[
bw_datapackage, bw_correlated
],
data_objs=[bw_datapackage, bw_correlated],
use_distributions=True if use_distributions > 0 else False,
use_arrays=True,
)

with CustomFilter("(almost) singular matrix"):
lca.lci()


lca.uncertain_parameters = uncertain_parameters
lca.technosphere_indices = technosphere_indices
lca.acts_category_idx_dict = acts_category_idx_dict
Expand Down
8 changes: 4 additions & 4 deletions pathways/subshares.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ def find_technology_indices(
)[0]

if activity_index is None:
print(f"Warning: No activity index found for technology '{tech}' in region '{region}'.")
print(
f"Warning: No activity index found for technology '{tech}' in region '{region}'."
)
continue

tech_data = regional_indices.setdefault(tech, {"idx": activity_index})
Expand Down Expand Up @@ -252,9 +254,7 @@ def get_nz_col_indices(index):
initial_amount
* subshares[tech_category][year][other_supplier]
)
list_indices.append(
(other_supplier_tech["idx"], consumer)
)
list_indices.append((other_supplier_tech["idx"], consumer))
list_amounts.append(tuple(amounts * -1))

indices = np.array(list_indices, dtype=bwp.INDICES_DTYPE)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ premise
pyyaml
bw_processing
bw2calc >= 2.0.dev18
cvxopt
scikit-umfpack
datapackage
pyprind
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def package_files(directory):
"scipy",
"premise",
"pyyaml",
"cvxopt",
"scikit-umfpack",
"bw_processing",
"bw2calc>=2.0.dev18",
"datapackage",
Expand Down

0 comments on commit 16d14b2

Please sign in to comment.