Skip to content
Merged
Show file tree
Hide file tree
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: 0 additions & 1 deletion sklearn/tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
"sklearn.utils.fixes.threadpool_limits",
"sklearn.utils.gen_batches",
"sklearn.utils.gen_even_slices",
"sklearn.utils.get_chunk_n_rows",
"sklearn.utils.graph.graph_shortest_path",
"sklearn.utils.graph.single_source_shortest_path_length",
"sklearn.utils.is_scalar_nan",
Expand Down
11 changes: 6 additions & 5 deletions sklearn/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def _print_elapsed_time(source, message=None):


def get_chunk_n_rows(row_bytes, *, max_n_rows=None, working_memory=None):
"""Calculates how many rows can be processed within working_memory.
"""Calculate how many rows can be processed within `working_memory`.

Parameters
----------
Expand All @@ -951,17 +951,18 @@ def get_chunk_n_rows(row_bytes, *, max_n_rows=None, working_memory=None):
max_n_rows : int, default=None
The maximum return value.
working_memory : int or float, default=None
The number of rows to fit inside this number of MiB will be returned.
When None (default), the value of
The number of rows to fit inside this number of MiB will be
returned. When None (default), the value of
``sklearn.get_config()['working_memory']`` is used.

Returns
-------
int or the value of n_samples
int
The number of rows which can be processed within `working_memory`.

Warns
-----
Issues a UserWarning if ``row_bytes`` exceeds ``working_memory`` MiB.
Issues a UserWarning if `row_bytes exceeds `working_memory` MiB.
"""

if working_memory is None:
Expand Down