Black-box density function estimation using recursive partitioning