You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A call to dask.bag.Bag.frequencies() generates an error if the bag has empty partitions, see the example below:
import dask
import dask.bag as db
import numpy as np
bag = db.from_sequence(np.arange(100), partition_size=10)
freq = bag.filter(lambda x: x < 50).frequencies()
freq.compute()
generates:
IndexError: list index out of range
Traceback
---------
File "dask/async.py", line 266, in execute_task
result = _execute_task(task, data)
File "dask/async.py", line 247, in _execute_task
return func(*args2)
File "dask/bag/core.py", line 1651, in empty_safe_aggregate
return empty_safe_apply(func, parts2)
File "dask/bag/core.py", line 1646, in empty_safe_apply
return func(part)
File "dask/bag/core.py", line 1452, in merge_frequencies
first, rest = seqs[0], seqs[1:]
The text was updated successfully, but these errors were encountered:
A call to dask.bag.Bag.frequencies() generates an error if the bag has empty partitions, see the example below:
generates:
The text was updated successfully, but these errors were encountered: