From 2beb1d1220ebb11fba9348fa3aba73f2d29fea2e Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Mon, 11 Jun 2018 10:40:17 -0700 Subject: [PATCH] Small clarification to description of batch_by_properties --- utils/iterables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/iterables.py b/utils/iterables.py index b21e3b5b..f7ed86fa 100644 --- a/utils/iterables.py +++ b/utils/iterables.py @@ -42,7 +42,8 @@ def batch_by_property(items, property_func): Takes in a list, and returns a list of tuples, (batch, prop) such that all items in a batch have the same output when put into property_func, and such that chaining all these - batches together would give the original list. + batches together would give the original list (i.e. order is + preserved) """ batch_prop_pairs = []