From 56dc9a2aeab8a4a72954405eaf825900c9e78dc4 Mon Sep 17 00:00:00 2001 From: Stiofain Fordham <17852477+sdfordham@users.noreply.github.com> Date: Sun, 19 May 2024 22:15:53 +0100 Subject: [PATCH 1/2] Remove coerce to integers --- pysyncon/utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pysyncon/utils.py b/pysyncon/utils.py index 1ab9723..a764d9d 100644 --- a/pysyncon/utils.py +++ b/pysyncon/utils.py @@ -246,10 +246,7 @@ def _single_placebo( """ scm.fit(dataprep=dataprep, **scm_options) - min_ = int(min(dataprep.foo[dataprep.time_variable])) - max_ = int(max(dataprep.foo[dataprep.time_variable])) - - Z0, Z1 = dataprep.make_outcome_mats(time_period=range(min_, max_)) + Z0, Z1 = dataprep.make_outcome_mats(time_period=dataprep.foo[dataprep.time_variable]) synthetic = scm._synthetic(Z0=Z0) gaps = scm._gaps(Z0=Z0, Z1=Z1) return synthetic.rename(dataprep.treatment_identifier), gaps.rename( From c0f1bbd5f377f7b2924a639bae909af7ffdce548 Mon Sep 17 00:00:00 2001 From: Stiofain Fordham <17852477+sdfordham@users.noreply.github.com> Date: Sun, 19 May 2024 22:17:55 +0100 Subject: [PATCH 2/2] Lint single placebo fn --- pysyncon/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pysyncon/utils.py b/pysyncon/utils.py index a764d9d..493c13b 100644 --- a/pysyncon/utils.py +++ b/pysyncon/utils.py @@ -246,7 +246,9 @@ def _single_placebo( """ scm.fit(dataprep=dataprep, **scm_options) - Z0, Z1 = dataprep.make_outcome_mats(time_period=dataprep.foo[dataprep.time_variable]) + Z0, Z1 = dataprep.make_outcome_mats( + time_period=dataprep.foo[dataprep.time_variable] + ) synthetic = scm._synthetic(Z0=Z0) gaps = scm._gaps(Z0=Z0, Z1=Z1) return synthetic.rename(dataprep.treatment_identifier), gaps.rename(