numpydoc
numpydoc copied to clipboard
Raises section leads to errors in document generation.
The Raises section generates errors when running make html &> error.txt.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.fft2:38: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.fftn:37: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.hfft:29: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.ifft:41: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.ifft2:45: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.ifftn:46: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.ihfft:29: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.irfft:40: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.irfft2:25: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.irfftn:45: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.rfft:32: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.rfft2:24: WARNING: Explicit markup ends without a blank line; unexpected unindent.
/home/charris/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py:docstring of numpy.fft.rfftn:38: WARNING: Explicit markup ends without a blank line; unexpected unindent.
Even so, it renders well enough.
I don't understand this issue. Could you please give an example docstring that can reproduce the error?
The docstrings that generate these warnings are in numpy/fft/fftpack.py, e.g. https://github.com/numpy/numpy/blob/master/numpy/fft/fftpack.py#L836. Looks like two raises entries generate this:
ValueError
If `s` and `axes` have different length, or `axes` not given and
``len(s) != 2``.
IndexError
If an element of `axes` is larger than than the number of axes of `a`.
A blank line above IndexError should not be needed.