Skip to content

Commit b00dfd1

Browse files
committed
Allow default number of nb_workers to be configured with "None".
1 parent 261a652 commit b00dfd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandarallel/core.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,14 @@ class pandarallel:
453453
def initialize(
454454
cls,
455455
shm_size_mb=None,
456-
nb_workers=NB_PHYSICAL_CORES,
456+
nb_workers: Optional[int] = None,
457457
progress_bar=False,
458458
verbose=2,
459459
use_memory_fs: Optional[bool] = None,
460460
) -> None:
461+
if nb_workers is None:
462+
nb_workers = NB_PHYSICAL_CORES
463+
461464
show_progress_bars = progress_bar
462465
is_memory_fs_available = Path(MEMORY_FS_ROOT).exists()
463466

0 commit comments

Comments
 (0)