Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions grain/_src/python/dataset/transformations/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def __call__(self, values: Sequence[T]) -> T:
def _batch_fn(*xs: Sequence[T]) -> T:
# If the thread pool is not available or the elements are not NumPy
# arrays, fall back to the standard serial `np.stack` operation.
# TODO: Support parallel batch when elements are not NumPy
if (self._parallel_batch_executor is None) or not isinstance(
xs[0], np.ndarray
):
Expand Down