Skip to content

Commit fcc2030

Browse files
committed
linting
Signed-off-by: Nathaniel <[email protected]>
1 parent 5dbc15e commit fcc2030

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

causalpy/tests/test_pymc_experiments.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,14 @@ def test_inverse_prop_param_recovery():
5050
df = cp.load_data("nhefs")
5151
seed = 42
5252
result = cp.pymc_experiments.InversePropensityWeighting(
53-
df,
54-
formula="trt ~ 1 + age + race",
55-
outcome_variable ="outcome",
56-
weighting_scheme="robust",
57-
model=cp.pymc_models.PropensityScore(
58-
sample_kwargs=sample_kwargs
59-
),
53+
df,
54+
formula="trt ~ 1 + age + race",
55+
outcome_variable="outcome",
56+
weighting_scheme="robust",
57+
model=cp.pymc_models.PropensityScore(sample_kwargs=sample_kwargs),
6058
)
6159
assert isinstance(result.idata, az.InferenceData)
62-
ps = result.idata.posterior['p'].mean(dim=('chain', 'draw'))
60+
ps = result.idata.posterior["p"].mean(dim=("chain", "draw"))
6361
w1, w2, _, _ = result.make_doubly_robust_adjustment(ps)
6462
assert isinstance(w1, pd.Series)
6563
assert isinstance(w2, pd.Series)
@@ -72,6 +70,3 @@ def test_inverse_prop_param_recovery():
7270
w1, w2, n1, n2 = result.make_overlap_adjustments(ps)
7371
assert isinstance(w1, pd.Series)
7472
assert isinstance(w2, pd.Series)
75-
76-
77-

docs/source/_static/interrogate_badge.svg

Lines changed: 3 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)