diff --git a/doc/sphinxext/numpydoc/numpydoc.py b/doc/sphinxext/numpydoc/numpydoc.py index 710c3cc9842c4..f06915997c616 100755 --- a/doc/sphinxext/numpydoc/numpydoc.py +++ b/doc/sphinxext/numpydoc/numpydoc.py @@ -43,9 +43,10 @@ def mangle_docstrings(app, what, name, obj, options, lines, ) # PANDAS HACK (to remove the list of methods/attributes for Categorical) - if what == "class" and (name.endswith(".Categorical") or - name.endswith("CategoricalIndex") or - name.endswith("IntervalIndex")): + no_autosummary = [".Categorical", "CategoricalIndex", "IntervalIndex", + "RangeIndex", "Int64Index", "UInt64Index", + "Float64Index"] + if what == "class" and any(name.endswith(n) for n in no_autosummary): cfg['class_members_list'] = False if what == 'module':