DOC: incorporating `Raises` section in scipy functions?

Hi, I was going through some of the functions in scipy/stats/ and most of the functions didn’t have the Raises section in their docstrings so I made this PR which adds it for a few of them.

I was particularly looking at the pearsonr function which was being used in one of the functions in networkx and I wanted to know what all errors this function throws. I think it would be helpful to have a Raises section and would really like to hear your thoughts on this.

Thank you :slight_smile:


Thank you for following up :raised_hands:

I am +1 as I consider this to be part of the public API. People doing exception handling need that information and it’s best if they don’t have to go through the code to get all the exceptions covered.

1 Like