Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTHofmann2023 additions #305

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion sed/binning/binning.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ def bin_dataframe(
xarray object, combining the data with the axes (bin centers).
"""
bins, axes, ranges = simplify_binning_arguments(bins, axes, ranges)

# filter dataframe to use only the columns needed for the binning
df = df[axes]
Comment on lines +296 to +297
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this before in your commits. I don't think this is helpful, as it introduces another graph layer. Did you try whether this really improve computation time? In my tests, it slowed things down. Or why did you introduce this in the first place?

# create the coordinate axes for the xarray output
# if provided as array, they are interpreted as bin centers
if isinstance(bins[0], np.ndarray):
Expand Down
Loading