Skip to content

Commit 3636364

Browse files
committed
chore: updated ruff fixes after merging with main
1 parent 501ff15 commit 3636364

File tree

1 file changed

+3
-3
lines changed
  • examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network

1 file changed

+3
-3
lines changed

examples/boltzmann_wealth_model_network/boltzmann_wealth_model_network/model.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ def step(self):
4040
def compute_gini(self):
4141
agent_wealths = [agent.wealth for agent in self.agents]
4242
x = sorted(agent_wealths)
43-
N = self.num_agents
44-
B = sum(xi * (N - i) for i, xi in enumerate(x)) / (N * sum(x))
45-
return 1 + (1 / N) - 2 * B
43+
num_agents = self.num_agents
44+
B = sum(xi * (num_agents - i) for i, xi in enumerate(x)) / (num_agents * sum(x)) # noqa: N806
45+
return 1 + (1 / num_agents) - 2 * B

0 commit comments

Comments
 (0)