Skip to content

Commit 0aec0eb

Browse files
committed
Merge branch 'inequality_exercise' of https://github.com/QuantEcon/lecture-python-intro into inequality_exercise
2 parents bbab6ca + a28f57c commit 0aec0eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lectures/inequality.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ data.head(n=2)
10941094
We can first compute the Gini coefficient using the function defined in the lecture above.
10951095

10961096
```{code-cell} ipython3
1097-
gini_coefficient(data.n_wealth.values)
1097+
gini_coefficient(data.n_wealth.values[1:3000])
10981098
```
10991099

11001100
Now we can write a vectorized version using `numpy`
@@ -1108,7 +1108,7 @@ def gini(y):
11081108
return g_sum / (2 * n * np.sum(y))
11091109
```
11101110
```{code-cell} ipython3
1111-
gini(data.n_wealth.values)
1111+
gini(data.n_wealth.values[1:3000])
11121112
```
11131113
Let's simulate five populations by drawing from a lognormal distribution as before
11141114

0 commit comments

Comments
 (0)