Skip to content

Commit 5127d54

Browse files
committed
DOC: fix ImportErrors in apigen.py for Python 3
The fix was copied from scikit-image's version of apigen.py
1 parent e5b4851 commit 5127d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/tools/apigen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _parse_module_with_import(self, uri):
207207
classes : list of str
208208
A list of (public) class names in the module.
209209
"""
210-
mod = __import__(uri, fromlist=[uri])
210+
mod = __import__(uri, fromlist=[uri.split('.')[-1]])
211211
# find all public objects in the module.
212212
obj_strs = [obj for obj in dir(mod) if not obj.startswith('_')]
213213
functions = []

0 commit comments

Comments
 (0)