File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 32
32
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
33
33
extensions = [
34
34
'sphinx.ext.autodoc' , 'sphinx.ext.autosummary' ,
35
- 'sphinx.ext.pngmath' , ' numpy_ext.numpydoc' ,
35
+ 'numpy_ext.numpydoc' ,
36
36
'sphinx.ext.linkcode' , 'sphinx.ext.doctest' ,
37
37
'sphinx_gallery.gen_gallery' ,
38
38
]
39
39
40
+ # pngmath / imgmath compatibility layer for different sphinx versions
41
+ import sphinx
42
+ from distutils .version import LooseVersion
43
+ if LooseVersion (sphinx .__version__ ) < LooseVersion ('1.4' ):
44
+ extensions .append ('sphinx.ext.pngmath' )
45
+ else :
46
+ extensions .append ('sphinx.ext.imgmath' )
47
+
48
+
40
49
autodoc_default_flags = ['members' , 'inherited-members' ]
41
50
42
51
# Add any paths that contain templates here, relative to this directory.
You can’t perform that action at this time.
0 commit comments