Skip to content

Commit

Permalink
MAINT: remove %matplotlib inline and contents directive (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky authored Jun 13, 2024
1 parent 3b2f1cb commit 6c06635
Show file tree
Hide file tree
Showing 46 changed files with 5 additions and 225 deletions.
5 changes: 0 additions & 5 deletions lectures/BCG_complete_mkts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Irrelevance of Capital Structures with Complete Markets

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -872,7 +868,6 @@ import matplotlib.pyplot as plt
from scipy.stats import norm
from numba import njit, prange
from quantecon.optimize import root_finding
%matplotlib inline
```

```{code-cell} python3
Expand Down
4 changes: 0 additions & 4 deletions lectures/BCG_incomplete_mkts.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ kernelspec:

# Equilibrium Capital Structures with Incomplete Markets

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython3
Expand Down
5 changes: 0 additions & 5 deletions lectures/additive_functionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ kernelspec:
```{index} single: Models; Additive functionals
```

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython3
Expand Down Expand Up @@ -78,7 +74,6 @@ import numpy as np
import scipy.linalg as la
import quantecon as qe
import matplotlib.pyplot as plt
%matplotlib inline
from scipy.stats import norm, lognorm
```

Expand Down
4 changes: 0 additions & 4 deletions lectures/amss.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Optimal Taxation without State-Contingent Debt

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down
5 changes: 0 additions & 5 deletions lectures/amss2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Fluctuating Interest Rates Deliver Fiscal Insurance

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -89,7 +85,6 @@ Let's start with some imports:

```{code-cell} ipython
import matplotlib.pyplot as plt
%matplotlib inline
from scipy.optimize import fsolve, fmin
```

Expand Down
5 changes: 0 additions & 5 deletions lectures/amss3.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Fiscal Risk and Government Debt

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -74,7 +70,6 @@ Let's start with some imports:

```{code-cell} ipython
import matplotlib.pyplot as plt
%matplotlib inline
from scipy.optimize import minimize
```

Expand Down
6 changes: 0 additions & 6 deletions lectures/arellano.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Default Risk and Income Fluctuations

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} python
Expand Down Expand Up @@ -78,9 +74,7 @@ Let's start with some imports:
import matplotlib.pyplot as plt
import numpy as np
import quantecon as qe
from numba import njit, prange
%matplotlib inline
```

## Structure
Expand Down
5 changes: 0 additions & 5 deletions lectures/arma.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# {index}`Covariance Stationary Processes <single: Covariance Stationary Processes>`

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -95,7 +91,6 @@ Let's start with some imports:
```{code-cell} ipython
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import quantecon as qe
```

Expand Down
6 changes: 0 additions & 6 deletions lectures/asset_pricing_lph.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ kernelspec:
```{index} single: Elementary Asset Pricing
```

```{contents} Contents
:depth: 2
```

## Overview

This lecture is about some implications of asset-pricing theories that are based on the equation
Expand Down Expand Up @@ -356,7 +352,6 @@ In drawing a frontier, we'll set $\sigma(m) = .25$ and $E m = .99$, values rough
```{code-cell} ipython3
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
# Define the function to plot
def y(x, alpha, beta):
Expand Down Expand Up @@ -590,7 +585,6 @@ Let's start with some imports.
import numpy as np
import statsmodels.api as sm
import matplotlib.pyplot as plt
%matplotlib inline
```
Lots of our calculations will involve computing population and sample OLS regressions.
Expand Down
5 changes: 0 additions & 5 deletions lectures/black_litterman.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ kernelspec:

# Two Modifications of Mean-Variance Portfolio Theory

```{contents} Contents
:depth: 2
```

## Overview

This lecture describes extensions to the classical mean-variance portfolio theory summarized in our lecture [Elementary Asset Pricing Theory](https://python-advanced.quantecon.org/asset_pricing_lph.html).
Expand Down Expand Up @@ -87,7 +83,6 @@ Let's start with some imports:
import numpy as np
import scipy.stats as stat
import matplotlib.pyplot as plt
%matplotlib inline
from ipywidgets import interact, FloatSlider
```

Expand Down
5 changes: 0 additions & 5 deletions lectures/calvo.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ kernelspec:
```{index} single: Models; Additive functionals
```

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -81,7 +77,6 @@ We'll start with some imports:
import numpy as np
from quantecon import LQ
import matplotlib.pyplot as plt
%matplotlib inline
```

## The Model
Expand Down
5 changes: 0 additions & 5 deletions lectures/cattle_cycles.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ kernelspec:

# Cattle Cycles

```{contents} Contents
:depth: 2
```

This is another member of a suite of lectures that use the quantecon DLE class to instantiate models within the
{cite}`HS2013` class of models described in detail in {doc}`Recursive Models of Dynamic Linear Economies <hs_recursive_models>`.

Expand All @@ -53,7 +49,6 @@ import matplotlib.pyplot as plt
from collections import namedtuple
from quantecon import DLE
from math import sqrt
%matplotlib inline
```

## The Model
Expand Down
5 changes: 0 additions & 5 deletions lectures/chang_credible.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Credible Government Policies in a Model of Chang

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -88,7 +84,6 @@ Let's start with some standard imports:
import numpy as np
import polytope
import matplotlib.pyplot as plt
%matplotlib inline
```

## The Setting
Expand Down
5 changes: 0 additions & 5 deletions lectures/chang_ramsey.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Competitive Equilibria of a Model of Chang

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -76,7 +72,6 @@ We'll start with some standard imports:
import numpy as np
import polytope
import matplotlib.pyplot as plt
%matplotlib inline
```

### The Setting
Expand Down
4 changes: 0 additions & 4 deletions lectures/classical_filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Classical Prediction and Filtering With Linear Algebra

```{contents} Contents
:depth: 2
```

## Overview

This is a sequel to the earlier lecture {doc}`Classical Control with Linear Algebra <lu_tricks>`.
Expand Down
4 changes: 0 additions & 4 deletions lectures/coase.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ kernelspec:

# {index}`Coase's Theory of the Firm <single: Coase's Theory of the Firm>`

```{contents} Contents
:depth: 2
```

## Overview

In 1937, Ronald Coase wrote a brilliant essay on the nature of the firm {cite}`coase1937nature`.
Expand Down
5 changes: 0 additions & 5 deletions lectures/cons_news.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Information and Consumption Smoothing

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture employs the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -607,7 +603,6 @@ As usual, we start by importing packages.
import numpy as np
import quantecon as qe
import matplotlib.pyplot as plt
%matplotlib inline
```
```{code-cell} python3
Expand Down
5 changes: 0 additions & 5 deletions lectures/discrete_dp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# {index}`Discrete State Dynamic Programming <single: Discrete State Dynamic Programming>`

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -66,7 +62,6 @@ Let's start with some imports:
```{code-cell} ipython
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import quantecon as qe
import scipy.sparse as sparse
from quantecon import compute_fixed_point
Expand Down
5 changes: 0 additions & 5 deletions lectures/dyn_stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ kernelspec:

# Stackelberg Plans

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -57,7 +53,6 @@ import numpy.linalg as la
import quantecon as qe
from quantecon import LQ
import matplotlib.pyplot as plt
%matplotlib inline
```

## Duopoly
Expand Down
7 changes: 1 addition & 6 deletions lectures/estspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ kernelspec:
</div>
```

# Estimation of {index}`Spectra <single: Spectra>`
# Estimation of Spectra

```{index} single: Spectra; Estimation
```

```{contents} Contents
:depth: 2
```

In addition to what's in Anaconda, this lecture will need the following libraries:

```{code-cell} ipython
Expand Down Expand Up @@ -59,7 +55,6 @@ Let's start with some standard imports:
```{code-cell} ipython
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
from quantecon import ARMA, periodogram, ar_periodogram
```

Expand Down
6 changes: 2 additions & 4 deletions lectures/five_preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ The preference orderings are
This labeling scheme is taken from {cite}`HansenSargent2001`.


Constraint and multiplier preferences express aversion to not knowing a unique probabiity distribution
that desribes random outcomes.
Constraint and multiplier preferences express aversion to not knowing a unique probability distribution
that describes random outcomes.

Expected utility, risk-sensitive, and ex post Bayesian expected utility preferences all attribute a unique known
probability distribution to a decision maker.
Expand All @@ -59,7 +59,6 @@ We begin with some that we'll use to create some graphs.
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (11, 5)
from matplotlib import rc, cm
from mpl_toolkits.mplot3d import Axes3D
from scipy import optimize, stats
Expand All @@ -73,7 +72,6 @@ from numba import njit
:tags: [hide-input]
# Plotting parameters
%matplotlib inline
%config InlineBackend.figure_format='retina'
plt.rc('text', usetex=True)
Expand Down
Loading

1 comment on commit 6c06635

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.