Skip to content

Commit 4a1fa2c

Browse files
committed
adjust to PEP8
1 parent c4086db commit 4a1fa2c

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

doubleml/double_ml_data.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,9 @@ def from_arrays(cls, x, y, d, cluster_vars, z=None, use_other_treat_as_covariate
725725

726726
data = pd.concat((pd.DataFrame(cluster_vars, columns=cluster_cols), dml_data.data), axis=1)
727727

728-
return(cls(data, dml_data.y_col, dml_data.d_cols,
729-
cluster_cols,
730-
dml_data.x_cols, dml_data.z_cols,
731-
dml_data.use_other_treat_as_covariate, dml_data.force_all_x_finite))
728+
return (cls(data, dml_data.y_col, dml_data.d_cols, cluster_cols,
729+
dml_data.x_cols, dml_data.z_cols,
730+
dml_data.use_other_treat_as_covariate, dml_data.force_all_x_finite))
732731

733732
@property
734733
def cluster_cols(self):

doubleml/double_ml_iivm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def _check_data(self, obj_dml_data):
206206
one_treat = (obj_dml_data.n_treat == 1)
207207
binary_treat = (type_of_target(obj_dml_data.d) == 'binary')
208208
zero_one_treat = np.all((np.power(obj_dml_data.d, 2) - obj_dml_data.d) == 0)
209-
if not(one_treat & binary_treat & zero_one_treat):
209+
if not (one_treat & binary_treat & zero_one_treat):
210210
raise ValueError('Incompatible data. '
211211
'To fit an IIVM model with DML '
212212
'exactly one binary variable with values 0 and 1 '
@@ -219,7 +219,7 @@ def _check_data(self, obj_dml_data):
219219
if one_instr:
220220
binary_instr = (type_of_target(obj_dml_data.z) == 'binary')
221221
zero_one_instr = np.all((np.power(obj_dml_data.z, 2) - obj_dml_data.z) == 0)
222-
if not(one_instr & binary_instr & zero_one_instr):
222+
if not (one_instr & binary_instr & zero_one_instr):
223223
raise ValueError(err_msg)
224224
else:
225225
raise ValueError(err_msg)

doubleml/double_ml_irm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def _check_data(self, obj_dml_data):
176176
one_treat = (obj_dml_data.n_treat == 1)
177177
binary_treat = (type_of_target(obj_dml_data.d) == 'binary')
178178
zero_one_treat = np.all((np.power(obj_dml_data.d, 2) - obj_dml_data.d) == 0)
179-
if not(one_treat & binary_treat & zero_one_treat):
179+
if not (one_treat & binary_treat & zero_one_treat):
180180
raise ValueError('Incompatible data. '
181181
'To fit an IRM model with DML '
182182
'exactly one binary variable with values 0 and 1 '

0 commit comments

Comments
 (0)