def _generate_indices(f, values=False):
 axes = f.axes
 if values:
  axes = [lrange(len(a)) for a in axes]
 return itertools.product(*axes)

def _generate_indices ( f , values = False ) : axes = f . axes if values : axes = [ lrange ( len ( a ) ) for a in axes ] return itertools . product ( * axes )
generate the indicies if values is true .