From 33c5a18bb1ae8e567a4fc1d35ab9cba940964811 Mon Sep 17 00:00:00 2001 From: Tim Mensinger Date: Thu, 5 Dec 2024 12:05:47 +0100 Subject: [PATCH] Add explicit assumption to _apply_to_batch docstring --- src/optimagic/optimization/history.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/optimagic/optimization/history.py b/src/optimagic/optimization/history.py index 2b0215722..14df3a67e 100644 --- a/src/optimagic/optimization/history.py +++ b/src/optimagic/optimization/history.py @@ -391,6 +391,8 @@ def _apply_to_batch( ) -> NDArray[np.float64]: """Apply a reduction operator on batches of data. + This function assumes that batch_ids non-empty and sorted. + Args: data: 1d array with data. batch_ids: A list with batch ids whose length is equal to the size of data.