BUG: Return of _logpmf

This fixes the bug mentioned in #4029
@ewmoore I updated that comment and merge all commits in just one. But I cant send the code to update this pull request... Can you help me?