Skip to content

Commit 7609f9e

Browse files
committed
working doc with gallery
1 parent fd6df63 commit 7609f9e

File tree

10 files changed

+42
-42
lines changed

10 files changed

+42
-42
lines changed

docs/source/conf.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
import re
1818
import sphinx_gallery
1919

20-
#try:
21-
from unittest.mock import MagicMock
22-
#except ImportError:
23-
# from mock import MagicMock
24-
25-
sys.path.insert(0, os.path.abspath("../.."))
26-
#sys.setrecursionlimit(1500)
27-
28-
29-
30-
class Mock(MagicMock):
31-
@classmethod
32-
def __getattr__(cls, name):
33-
return Mock()
34-
35-
MOCK_MODULES = [ 'emd','ot.lp.emd']
36-
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
20+
##try:
21+
#from unittest.mock import MagicMock
22+
##except ImportError:
23+
## from mock import MagicMock
24+
#
25+
#sys.path.insert(0, os.path.abspath("../.."))
26+
##sys.setrecursionlimit(1500)
27+
#
28+
#
29+
#
30+
#class Mock(MagicMock):
31+
# @classmethod
32+
# def __getattr__(cls, name):
33+
# return Mock()
34+
#
35+
#MOCK_MODULES = [ 'emd','ot.lp.emd']
36+
#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
3737

3838
# If extensions (or modules to document with autodoc) are in another directory,
3939
# add these directories to sys.path here. If the directory is relative to the
@@ -58,7 +58,7 @@ def __getattr__(cls, name):
5858
'sphinx.ext.ifconfig',
5959
'sphinx.ext.viewcode',
6060
'sphinx.ext.napoleon',
61-
# 'sphinx_gallery.gen_gallery',
61+
'sphinx_gallery.gen_gallery',
6262
]
6363

6464
# Add any paths that contain templates here, relative to this directory.
@@ -324,6 +324,7 @@ def __getattr__(cls, name):
324324
sphinx_gallery_conf = {
325325
'examples_dirs': '../../examples',
326326
'gallery_dirs': 'auto_examples',
327+
'mod_example_dir': '../modules/generated/',
327328
'reference_url': {
328329
'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1',
329330
'scipy': 'http://docs.scipy.org/doc/scipy-0.17.0/reference'}

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Contents
1010
--------
1111

1212
.. toctree::
13-
:maxdepth: 2
13+
:maxdepth: 3
1414

1515
self
1616
all
17-
auto_examples
17+
auto_examples/index
1818

1919
.. include:: readme.rst
2020
:start-line: 5

examples/README.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
============
21
POT Examples
32
============

examples/plot_OTDA_2D.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
===============================================
4-
demo of Optimal transport for domain adaptation
5-
===============================================
3+
==============================
4+
OT for empirical distributions
5+
==============================
66
77
"""
88

examples/plot_OTDA_classes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
===============================================
4-
demo of Optimal transport for domain adaptation
5-
===============================================
3+
========================
4+
OT for domain adaptation
5+
========================
66
77
"""
88

examples/plot_OTDA_color_images.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
=====================================================================================
4-
Demo of Optimal transport for domain adaptation with image color adaptation as in [6]
5-
=====================================================================================
3+
========================================================
4+
OT for domain adaptation with image color adaptation [6]
5+
========================================================
66
77
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
88
"""

examples/plot_OTDA_mapping.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
=======================================================
4-
Demo of OT mapping estimation for domain adaptation [8]
5-
=======================================================
3+
===============================================
4+
OT mapping estimation for domain adaptation [8]
5+
===============================================
66
77
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard, "Mapping estimation for
88
discrete optimal transport", Neural Information Processing Systems (NIPS), 2016.

examples/plot_OTDA_mapping_color_images.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
======================================================================================================================
4-
Demo of Optimal transport for domain adaptation with image color adaptation as in [6] with mapping estimation from [8]
5-
======================================================================================================================
3+
====================================================================================
4+
OT for domain adaptation with image color adaptation [6] with mapping estimation [8]
5+
====================================================================================
66
77
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014). Regularized
88
discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.

examples/plot_OT_1D.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
=============================
4-
Demo for 1D optimal transport
5-
=============================
3+
====================
4+
1D optimal transport
5+
====================
66
77
@author: rflamary
88
"""

examples/plot_OT_2D_samples.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
=============================================================
4-
Demo for 2D Optimal transport between empirical distributions
5-
=============================================================
3+
====================================================
4+
2D Optimal transport between empirical distributions
5+
====================================================
66
77
@author: rflamary
88
"""

0 commit comments

Comments
 (0)