Skip to content

Commit f8cfb5d

Browse files
authored
Allow reindexing to sparse (#430)
* Support reindexing to a sparse array * Fix benchmarks * fix? * fix benchmarks
1 parent a4be06f commit f8cfb5d

File tree

7 files changed

+302
-94
lines changed

7 files changed

+302
-94
lines changed

asv_bench/benchmarks/combine.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ def _get_combine(combine):
1414
if combine == "grouped":
1515
return partial(flox.core._grouped_combine, engine="numpy")
1616
else:
17-
return partial(flox.core._simple_combine, reindex=False)
17+
try:
18+
reindex = flox.ReindexStrategy(blockwise=False)
19+
except AttributeError:
20+
reindex = False
21+
return partial(flox.core._simple_combine, reindex=reindex)
1822

1923

2024
class Combine:

flox/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
groupby_scan,
1010
rechunk_for_blockwise,
1111
rechunk_for_cohorts,
12+
ReindexStrategy,
13+
ReindexArrayType,
1214
) # noqa
1315

1416

0 commit comments

Comments
 (0)