BUG: fix issue with logpmf method of stats distributions.
Merge branch 'pr/4049' into master.

See https://github.com/scipy/scipy/pull/4049