Skip to content

Commit b5842bb

Browse files
DOC: fix no autosummary for numerical index api pages (#17642)
1 parent 7e87385 commit b5842bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/sphinxext/numpydoc/numpydoc.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ def mangle_docstrings(app, what, name, obj, options, lines,
4343
)
4444

4545
# PANDAS HACK (to remove the list of methods/attributes for Categorical)
46-
if what == "class" and (name.endswith(".Categorical") or
47-
name.endswith("CategoricalIndex") or
48-
name.endswith("IntervalIndex")):
46+
no_autosummary = [".Categorical", "CategoricalIndex", "IntervalIndex",
47+
"RangeIndex", "Int64Index", "UInt64Index",
48+
"Float64Index"]
49+
if what == "class" and any(name.endswith(n) for n in no_autosummary):
4950
cfg['class_members_list'] = False
5051

5152
if what == 'module':

0 commit comments

Comments
 (0)