BUG: stats.entropy broken (issue #3030)

`stats.entropy` will fail when calculate relative entropy of arrays whose ndim > 1. (issue #3030)
According to the comment in the original code, `inf` should be given if there's a zero in `qk` but the corresponding place of `pk` is not zero. But the checking does not work with arrays whose ndim > 1.