KL_divergence accepts 2-dim array as an input