From 86ba660a92fa186f0901191d040103b015e8d14d Mon Sep 17 00:00:00 2001 From: kp992 <145801876+kp992@users.noreply.github.com> Date: Mon, 29 Jan 2024 08:42:47 +0530 Subject: [PATCH] Remove unused imports (#331) --- lectures/business_cycle.md | 2 -- lectures/commod_price.md | 2 +- lectures/eigen_II.md | 1 - lectures/geom_series.md | 3 +-- lectures/heavy_tails.md | 4 +--- lectures/inflation_history.md | 1 - lectures/input_output.md | 1 - lectures/lln_clt.md | 1 - lectures/markov_chains_I.md | 1 - lectures/markov_chains_II.md | 3 --- lectures/mle.md | 4 ++-- lectures/networks.md | 1 - lectures/olg.md | 1 - lectures/supply_demand_heterogeneity.md | 2 -- lectures/supply_demand_multiple_goods.md | 1 - 15 files changed, 5 insertions(+), 23 deletions(-) diff --git a/lectures/business_cycle.md b/lectures/business_cycle.md index afa7c83d..6cfaaa2b 100644 --- a/lectures/business_cycle.md +++ b/lectures/business_cycle.md @@ -38,8 +38,6 @@ We use the following imports ```{code-cell} ipython3 import matplotlib.pyplot as plt import pandas as pd -import numpy as np -import scipy.stats as st import datetime import wbgapi as wb import pandas_datareader.data as web diff --git a/lectures/commod_price.md b/lectures/commod_price.md index 0489e8e7..be5d5f33 100644 --- a/lectures/commod_price.md +++ b/lectures/commod_price.md @@ -50,7 +50,7 @@ import numpy as np import yfinance as yf import matplotlib.pyplot as plt from scipy.interpolate import interp1d -from scipy.optimize import minimize_scalar, brentq +from scipy.optimize import brentq from scipy.stats import beta ``` diff --git a/lectures/eigen_II.md b/lectures/eigen_II.md index 36d3ec83..d57dd048 100644 --- a/lectures/eigen_II.md +++ b/lectures/eigen_II.md @@ -35,7 +35,6 @@ Then we will explore the Perron-Frobenius Theorem and connect it to applications We will use the following imports: ```{code-cell} ipython3 -import matplotlib.pyplot as plt import numpy as np from numpy.linalg import eig import scipy as sp diff --git a/lectures/geom_series.md b/lectures/geom_series.md index b10d825b..3d9bfe70 100644 --- a/lectures/geom_series.md +++ b/lectures/geom_series.md @@ -56,9 +56,8 @@ import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = (11, 5) #set default figure size import numpy as np import sympy as sym -from sympy import init_printing, latex +from sympy import init_printing from matplotlib import cm -from mpl_toolkits.mplot3d import Axes3D ``` ## Key formulas diff --git a/lectures/heavy_tails.md b/lectures/heavy_tails.md index 2faf77d6..3e58038a 100644 --- a/lectures/heavy_tails.md +++ b/lectures/heavy_tails.md @@ -23,7 +23,7 @@ In addition to what's in Anaconda, this lecture will need the following librarie ```{code-cell} ipython3 :tags: [hide-output] -!pip install --upgrade yfinance quantecon pandas_datareader interpolation +!pip install --upgrade yfinance pandas_datareader interpolation ``` We use the following imports. @@ -31,10 +31,8 @@ We use the following imports. ```{code-cell} ipython3 import matplotlib.pyplot as plt import numpy as np -import quantecon as qe import yfinance as yf import pandas as pd -import pandas_datareader.data as web import statsmodels.api as sm from interpolation import interp diff --git a/lectures/inflation_history.md b/lectures/inflation_history.md index cd453851..e6e0ac83 100644 --- a/lectures/inflation_history.md +++ b/lectures/inflation_history.md @@ -60,7 +60,6 @@ import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates -import datetime ``` ```{code-cell} ipython3 diff --git a/lectures/input_output.md b/lectures/input_output.md index 8124be55..8d6d649b 100644 --- a/lectures/input_output.md +++ b/lectures/input_output.md @@ -27,7 +27,6 @@ This lecture requires the following imports and installs before we proceed. ```{code-cell} ipython3 import numpy as np -import pandas as pd import networkx as nx import matplotlib.pyplot as plt import quantecon_book_networks diff --git a/lectures/lln_clt.md b/lectures/lln_clt.md index 6a43b812..eaa05701 100644 --- a/lectures/lln_clt.md +++ b/lectures/lln_clt.md @@ -34,7 +34,6 @@ We'll need the following imports: ```{code-cell} ipython3 import matplotlib.pyplot as plt -import random import numpy as np import scipy.stats as st ``` diff --git a/lectures/markov_chains_I.md b/lectures/markov_chains_I.md index 16aed135..8fe1fa27 100644 --- a/lectures/markov_chains_I.md +++ b/lectures/markov_chains_I.md @@ -58,7 +58,6 @@ import numpy as np import networkx as nx from matplotlib import cm import matplotlib as mpl -from itertools import cycle ``` ## Definitions and examples diff --git a/lectures/markov_chains_II.md b/lectures/markov_chains_II.md index aeb58ca5..3157d6c1 100644 --- a/lectures/markov_chains_II.md +++ b/lectures/markov_chains_II.md @@ -56,9 +56,6 @@ import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = (11, 5) # set default figure size import quantecon as qe import numpy as np -import networkx as nx -from matplotlib import cm -import matplotlib as mpl ``` (mc_irreducible)= diff --git a/lectures/mle.md b/lectures/mle.md index 963597da..ee00c399 100644 --- a/lectures/mle.md +++ b/lectures/mle.md @@ -14,12 +14,12 @@ kernelspec: # Maximum Likelihood Estimation ```{code-cell} ipython3 -from scipy.stats import lognorm, pareto, expon, norm +from scipy.stats import lognorm, pareto, expon import numpy as np from scipy.integrate import quad import matplotlib.pyplot as plt import pandas as pd -from math import exp, log +from math import exp ``` ## Introduction diff --git a/lectures/networks.md b/lectures/networks.md index b041a854..e2072046 100644 --- a/lectures/networks.md +++ b/lectures/networks.md @@ -57,7 +57,6 @@ import pandas as pd import quantecon as qe import matplotlib.cm as cm -import quantecon_book_networks import quantecon_book_networks.input_output as qbn_io import quantecon_book_networks.data as qbn_data diff --git a/lectures/olg.md b/lectures/olg.md index 90c6789a..23b97701 100644 --- a/lectures/olg.md +++ b/lectures/olg.md @@ -65,7 +65,6 @@ Let's start with some imports. import numpy as np from scipy import optimize from collections import namedtuple -from functools import partial import matplotlib.pyplot as plt ``` diff --git a/lectures/supply_demand_heterogeneity.md b/lectures/supply_demand_heterogeneity.md index d393e6b7..dd9e5b74 100644 --- a/lectures/supply_demand_heterogeneity.md +++ b/lectures/supply_demand_heterogeneity.md @@ -37,8 +37,6 @@ Here are some imports: ```{code-cell} ipython3 import numpy as np -import pandas as pd -import matplotlib.pyplot as plt from scipy.linalg import inv ``` diff --git a/lectures/supply_demand_multiple_goods.md b/lectures/supply_demand_multiple_goods.md index ddea4d32..5a010cea 100644 --- a/lectures/supply_demand_multiple_goods.md +++ b/lectures/supply_demand_multiple_goods.md @@ -58,7 +58,6 @@ As usual, we start by importing some Python modules. ```{code-cell} ipython3 # import some packages import numpy as np -import pandas as pd import matplotlib.pyplot as plt from scipy.linalg import inv ```