Each distribution is represented with an array of arrays with PMF values.
UPD 1: I have $P=(p_1, ... , p_n)$ where $P$ is a distribution of distributions and $p_i=(p_i^1, ..., p_i^m)$. My task is to compute $D_{KL}(P, Q)$.
UPD 2: Each $p_i$ is PMF and $\sum_j p_i^j=1$ for each i.