Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoDiepers committed Sep 12, 2024
1 parent 2c64eca commit a85349b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bw_timex/timex_lca.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ def create_labelled_dynamic_inventory_dataframe(self) -> pd.DataFrame:

df = self.dynamic_inventory_df.copy()
df["flow"] = df["flow"].apply(lambda x: bd.get_node(id=x)["name"])

activity_name_cache = {}

for activity in df["activity"].unique():
Expand All @@ -1184,7 +1184,7 @@ def create_labelled_dynamic_inventory_dataframe(self) -> pd.DataFrame:
)

df["activity"] = df["activity"].map(activity_name_cache)

return df

def plot_dynamic_inventory(self, bio_flows, cumulative=False) -> None:
Expand Down
2 changes: 1 addition & 1 deletion docs/content/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```{note}
1) We recommend installation via `conda` or `mamba`.
2) bw_timex depends on Brightway25, and will install bw25-compatible versions of the bw packages. This means that it cannot be added to existing virtual environments that are based on Brightway2, e.g., environments containing [Activity Browser](https://github.com/LCA-ActivityBrowser/activity-browser). Please install bw_timex in a separate environment following the instructions below.
2) bw_timex depends on Brightway25, and will install bw25-compatible versions of the bw packages. This means that it cannot be added to existing virtual environments that are based on Brightway2, e.g., environments containing [Activity Browser](https://github.com/LCA-ActivityBrowser/activity-browser). Please install bw_timex in a separate environment following the instructions below.
```

## Installing `bw_timex` using `conda` or `mamba`
Expand Down
4 changes: 2 additions & 2 deletions docs/content/theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import numpy as np
from bw_temporalis import TemporalDistribution
two_and_four_years_ahead = TemporalDistribution(
date=np.array([2, 4], dtype="timedelta64[Y]"),
date=np.array([2, 4], dtype="timedelta64[Y]"),
amount=np.array([0.3, 0.7])
)
Expand All @@ -65,7 +65,7 @@ two_and_four_years_ahead.graph(resolution="Y")
The other distribution spreads an amount over the following 4 months, with decreasing shares:
```python
spread_over_four_months = TemporalDistribution(
date=np.array([0, 1, 2, 3], dtype="timedelta64[M]"),
date=np.array([0, 1, 2, 3], dtype="timedelta64[M]"),
amount=np.array([0.4, 0.3, 0.2, 0.1])
)
Expand Down

0 comments on commit a85349b

Please sign in to comment.