diff --git a/docs/scripts/readme_plot.py b/docs/scripts/readme_plot.py index 77050af..63b9c5b 100644 --- a/docs/scripts/readme_plot.py +++ b/docs/scripts/readme_plot.py @@ -129,11 +129,9 @@ def give_money(self): # Add the income to the other agents # 1. Using native expressions - """self.agents = self.agents.with_columns( - pl.when(pl.col("unique_id").is_in(new_wealth["unique_id"])) - .then(pl.col("wealth") + new_wealth["wealth"]) - .otherwise(pl.col("wealth")) - )""" + """self.agents = self.agents.join(new_wealth, on="unique_id", how="left").fill_null( + 0 + ).with_columns(wealth=pl.col("wealth") + pl.col("len")).drop("len")""" # 2. Using the set method """self.set( diff --git a/pyproject.toml b/pyproject.toml index b9c5d27..cd17c04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,5 +31,8 @@ dev = [ "mesa", ] +[tool.hatch.envs.dev] #Allows installing dev as virtual env +features = ["dev"] + [tool.hatch.build.targets.wheel] packages = ["mesa_frames"]