duplicated comment to address review
@@ -223,6 +223,9 @@ def get_batch_scale(data, batch_size, batch_dim):
# if batch_size == 0, don't index (saves time/space)
scale = 1.0
else:
+ # handle lists and other ordered sequence types (e.g. tuples but not sets)
+ assert batch_dim == 0, \
+ "batch_dim for non-tensor map_data must be 0"
assert batch_size <= len(data), \
"batch must be smaller than dataset size"
# if batch_size > 0, select a random set of indices and store it
