File tree 2 files changed +4
-6
lines changed
dataframe/pandas/partitioning
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -681,10 +681,7 @@ def broadcast_apply(
681
681
np.ndarray
682
682
NumPy array of result partition objects.
683
683
"""
684
- # The `broadcast_apply` runtime condition differs from
685
- # the same condition in `map_partitions` because the columnar
686
- # approach for `broadcast_apply` results in a slowdown.
687
- if np .prod (left .shape ) <= 1.5 * CpuCount .get ():
684
+ if not DynamicPartitioning .get ():
688
685
# block-wise broadcast
689
686
new_partitions = cls .base_broadcast_apply (
690
687
axis ,
@@ -693,6 +690,8 @@ def broadcast_apply(
693
690
right ,
694
691
)
695
692
else :
693
+ # The dynamic partitioning behavior of `broadcast_apply` differs from that of `map_partitions`,
694
+ # since the columnar approach for `broadcast_apply` results in slowdown.
696
695
# axis-wise broadcast
697
696
new_partitions = cls .broadcast_axis_partitions (
698
697
axis = axis ^ 1 ,
Original file line number Diff line number Diff line change 45
45
from pandas .core .indexing import check_bool_indexer
46
46
from pandas .errors import DataError
47
47
48
- from modin .config import RangePartitioning
49
- from modin .config .envvars import CpuCount
48
+ from modin .config import CpuCount , RangePartitioning
50
49
from modin .core .dataframe .algebra import (
51
50
Binary ,
52
51
Fold ,
You can’t perform that action at this time.
0 commit comments