#NEWLINE# def make_batches( size , batch_size ) : #NEWLINE# #INDENT# 'Returns a list of batch indices (tuples of indices).\n    ' #NEWLINE# nb_batch = int ( np . ceil ( ( size / float ( batch_size ) ) ) ) #NEWLINE# return [ ( ( i * batch_size ) , min ( size , ( ( i + 1 ) * batch_size ) ) ) for i in range ( 0 , nb_batch ) ]