implement batch entropy in python

Yes, to_sample is no good. The word I want is "the argument to a probability function which is not the conditional part." I don't know a good term though.