From 6bb0d3177d3a34ac783461e9197d3687ed315c86 Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Wed, 4 Sep 2024 15:59:39 -0700 Subject: [PATCH] Pass numpy array to ECDF method --- plotnine/stats/stat_ecdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotnine/stats/stat_ecdf.py b/plotnine/stats/stat_ecdf.py index 9d523b770..25410638e 100644 --- a/plotnine/stats/stat_ecdf.py +++ b/plotnine/stats/stat_ecdf.py @@ -63,6 +63,6 @@ def compute_group(cls, data, scales, **params): if params["pad"]: x = np.hstack([-np.inf, x, np.inf]) - ecdf = ECDF(data["x"])(x) + ecdf = ECDF(data["x"].to_numpy())(x) res = pd.DataFrame({"x": x, "ecdf": ecdf}) return res