Limpiar los avisos de estilo
This commit is contained in:
@@ -10,8 +10,11 @@ def test_unestimable_covariances_never_produce_zero_width_intervals():
|
||||
X, Z = np.ones((1, 1)), np.empty((1, 0))
|
||||
good = Fit(1, 0, baseline, params, np.eye(len(params)), 0, True)
|
||||
assert np.isfinite(good.risk_with_variance(X, Z, [0, 1])[1]).all()
|
||||
for covariance in (np.full((len(params), len(params)), np.nan),
|
||||
-np.eye(len(params)), np.zeros((len(params), len(params)))):
|
||||
for covariance in (
|
||||
np.full((len(params), len(params)), np.nan),
|
||||
-np.eye(len(params)),
|
||||
np.zeros((len(params), len(params))),
|
||||
):
|
||||
broken = Fit(1, 0, baseline, params, covariance, 0, True)
|
||||
assert np.isnan(broken.risk_with_variance(X, Z, [0, 1])[1]).all()
|
||||
|
||||
@@ -35,6 +38,6 @@ def test_diagnostics_count_rows_without_intervals():
|
||||
model.fits_ = {(): Fit(1, 0, baseline, params, -np.eye(len(params)), 0, True)}
|
||||
model.seen_ = {(): {}}
|
||||
report = model.variance_diagnostics(pd.DataFrame(index=range(2)))
|
||||
assert report['strata'][0]['rows_without_interval'] == 2
|
||||
assert report['strata'][0]['negative_variances']
|
||||
assert report['strata'][0]['status'] == 'not_estimable'
|
||||
assert report["strata"][0]["rows_without_interval"] == 2
|
||||
assert report["strata"][0]["negative_variances"]
|
||||
assert report["strata"][0]["status"] == "not_estimable"
|
||||
|
||||
Reference in New Issue
Block a user