numpydoc icon indicating copy to clipboard operation
numpydoc copied to clipboard

Raises section leads to errors in document generation.

Open charris opened this issue 10 years ago • 2 comments

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.

charris avatar Jul 02 '15 02:07 charris

I don't understand this issue. Could you please give an example docstring that can reproduce the error?

jnothman avatar Sep 10 '17 13:09 jnothman

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.

rgommers avatar Sep 11 '17 09:09 rgommers