jupyter / papyri

MIT License
84 stars 17 forks source link

incorrect parsing of `numpy.ma.core:MaskedArray.resize` docstring by numpydoc. #361

Open Carreau opened 9 months ago

Carreau commented 9 months ago

The docstring is:

.. warning::

    This method does nothing, except raise a ValueError exception. A
    masked array does not own its data and therefore cannot safely be
    resized in place. Use the `numpy.ma.resize` function instead.

This method is difficult to implement safely and may be deprecated in
future releases of NumPy.

This leads to a split of .. warning:: to be alone in its own section.

It does not seem to be critical for sphinx as it "reassemble" the "Summary" and "Extended summary", but maybe we can fix that upstream ?

melissawm commented 9 months ago

Exactly - that's what I detected earlier but forgot to flag. I think this should be fixed upstream. I am checking a list of potential fixes we could send to numpy in one go.