The function compute_group appears to be failing in stat_summary_bin.py on line 140. We get the following index error: IndexError: arrays used as indices must be of integer (or boolean) type
The following Python code can reproduce the error:
import numpy as np
import pandas as pd
from plotnine import *
df = pd.DataFrame({"x": np.random.normal(50, 50, 1000), "y": np.random.normal(50, 50, 1000)})
ggplot(df, aes("x", "y")) + stat_summary_bin(geom="point", fun_y=np.mean, bins=10)
Comparable R code that runs just fine:
library(ggplot2)
df = data.frame(x = seq(from=1, to=100, by=1), y = seq(from=1, to=100, by=1),)
ggplot(df, aes(x, y)) + stat_summary_bin(geom="point", fun.y=mean, bins=10)
Let me know if I can be of any more assistance. I love plotnine and thanks for all your hard work.
The function compute_group appears to be failing in stat_summary_bin.py on line 140. We get the following index error:
IndexError: arrays used as indices must be of integer (or boolean) typeThe following Python code can reproduce the error:
Comparable R code that runs just fine:
Let me know if I can be of any more assistance. I love plotnine and thanks for all your hard work.