Skip to content

Commit 8a43c0d

Browse files
committed
Run pre-commit
1 parent 901dd7c commit 8a43c0d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

HARK/Calibration/Income/IncomeProcesses.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, sigma, n_approx, neutral_measure=False, seed=0):
7878
logn_approx = lognormal_dstn.discretize(
7979
n_approx if sigma > 0.0 else 1, method="equiprobable", tail_N=0
8080
)
81-
81+
8282
limit = {
8383
"dist": lognormal_dstn,
8484
"method": "equiprobable",
@@ -87,7 +87,7 @@ def __init__(self, sigma, n_approx, neutral_measure=False, seed=0):
8787
"infimum": logn_approx.limit["infimum"],
8888
"supremum": logn_approx.limit["supremum"],
8989
}
90-
90+
9191
# Change the pmv if necessary
9292
if neutral_measure:
9393
logn_approx.pmv = (logn_approx.atoms * logn_approx.pmv).flatten()
@@ -127,7 +127,7 @@ def __init__(self, sigma, UnempPrb, IncUnemp, n_approx, seed=0):
127127
dstn_approx = dstn_orig.discretize(
128128
n_approx if sigma > 0.0 else 1, method="equiprobable", tail_N=0
129129
)
130-
130+
131131
if UnempPrb > 0.0:
132132
dstn_approx = add_discrete_outcome_constant_mean(
133133
dstn_approx, p=UnempPrb, x=IncUnemp

HARK/distributions/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, seed: Optional[int] = 0) -> None:
4343

4444
self._seed: int = _seed
4545
self._rng: random.Generator = random.default_rng(self._seed)
46-
46+
4747
# Bounds of distribution support should be overwritten by subclasses
4848
self.infimum = np.array([])
4949
self.supremum = np.array([])

HARK/distributions/continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class Weibull(ContinuousFrozenDistribution):
511511
def __init__(self, scale=1.0, shape=1.0, seed=0):
512512
self.scale = np.asarray(scale)
513513
self.shape = np.asarray(shape)
514-
514+
515515
# Set up the RNG
516516
super().__init__(stats.weibull_min, c=shape, scale=scale, seed=seed)
517517
self.infimum = np.array([0.0])

HARK/distributions/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
)
1212
from HARK.distributions.continuous import Normal
1313

14+
1415
# TODO: This function does not generate the limit attribute
1516
def approx_lognormal_gauss_hermite(N, mu=0.0, sigma=1.0, seed=0):
1617
d = Normal(mu, sigma).discretize(N, method="hermite")
@@ -258,7 +259,7 @@ def add_discrete_outcome_constant_mean(distribution, x, p, sort=False):
258259
],
259260
seed=distribution.seed,
260261
)
261-
262+
262263
else:
263264
atoms = np.append(x, distribution.atoms * (1 - p * x) / (1 - p))
264265
pmv = np.append(p, distribution.pmv * (1 - p))
@@ -301,7 +302,6 @@ def add_discrete_outcome_constant_mean(distribution, x, p, sort=False):
301302
return DiscreteDistribution(pmv, atoms, seed=distribution.seed, limit=limit)
302303

303304

304-
305305
def add_discrete_outcome(distribution, x, p, sort=False):
306306
"""
307307
Adds a discrete outcome of x with probability p to an existing distribution,
@@ -426,7 +426,7 @@ def combine_indep_dstns(*distributions, seed=0):
426426
P_out = np.prod(P_temp, axis=0)
427427

428428
assert np.isclose(np.sum(P_out), 1), "Probabilities do not sum to 1!"
429-
429+
430430
# Make the limit dictionary
431431
infimum = np.concatenate(
432432
[distributions[i].limit["infimum"] for i in range(dstn_count)]

0 commit comments

Comments
 (0)