Skip to content

Commit

Permalink
Simpler way
Browse files Browse the repository at this point in the history
(since we're going to import it anyway)
  • Loading branch information
martindurant committed Sep 19, 2024
1 parent e7dd906 commit f2caba6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dask_histogram/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,12 @@ def _get_optimization_function():
# detected then the original graph is returned unchanged.
import importlib.metadata

if importlib.metadata.distribution("dask_awkward"):
try:
from dask_awkward.lib.optimize import all_optimizations

return all_optimizations
except (ImportError, ModuleNotFoundError):
pass
return optimize


Expand Down

0 comments on commit f2caba6

Please sign in to comment.