提交 ef5a7612 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix documentation generation on Windows

上级 f5240f36
...@@ -289,6 +289,7 @@ node representing the application of Op ``mul`` to inputs ``x`` and ...@@ -289,6 +289,7 @@ node representing the application of Op ``mul`` to inputs ``x`` and
``y``, giving a Variable instance of type ``double`` as the output. ``y``, giving a Variable instance of type ``double`` as the output.
.. note:: .. note::
Theano relies on the fact that if you call the ``make_node`` method Theano relies on the fact that if you call the ``make_node`` method
of Apply's first argument on the inputs passed as the Apply's of Apply's first argument on the inputs passed as the Apply's
second argument, the call will not fail and the returned Apply second argument, the call will not fail and the returned Apply
...@@ -315,6 +316,7 @@ contain a single storage cell for the multiplication's variable. ...@@ -315,6 +316,7 @@ contain a single storage cell for the multiplication's variable.
Here, ``z`` is a list of one element. By default, ``z == [None]``. Here, ``z`` is a list of one element. By default, ``z == [None]``.
.. note:: .. note::
It is possible that ``z`` does not contain ``None``. If it contains It is possible that ``z`` does not contain ``None``. If it contains
anything else, Theano guarantees that whatever it contains is what anything else, Theano guarantees that whatever it contains is what
``perform`` put there the last time it was called with this ``perform`` put there the last time it was called with this
...@@ -324,6 +326,7 @@ Here, ``z`` is a list of one element. By default, ``z == [None]``. ...@@ -324,6 +326,7 @@ Here, ``z`` is a list of one element. By default, ``z == [None]``.
:ref:`op` documentation. :ref:`op` documentation.
.. warning:: .. warning::
We gave ``z`` the Theano type ``double`` in ``make_node``, which means We gave ``z`` the Theano type ``double`` in ``make_node``, which means
that a Python ``float`` must be put there. You should not put, say, an that a Python ``float`` must be put there. You should not put, say, an
``int`` in ``z[0]`` because Theano assumes Ops handle typing properly. ``int`` in ``z[0]`` because Theano assumes Ops handle typing properly.
......
...@@ -232,6 +232,7 @@ arithmetics that your Ops implement. Theano might provide facilities ...@@ -232,6 +232,7 @@ arithmetics that your Ops implement. Theano might provide facilities
for this somewhere in the future. for this somewhere in the future.
.. note:: .. note::
:class:`Env` is a Theano structure intended for the optimization :class:`Env` is a Theano structure intended for the optimization
phase. It is used internally by function and Module and is rarely phase. It is used internally by function and Module and is rarely
exposed to the end user. You can use it to test out optimizations, exposed to the end user. You can use it to test out optimizations,
......
...@@ -98,6 +98,7 @@ case if ``borrow`` was True, the thunk would be allowed to reuse (or ...@@ -98,6 +98,7 @@ case if ``borrow`` was True, the thunk would be allowed to reuse (or
"recycle") the storage). "recycle") the storage).
.. note:: .. note::
Compiled libraries are stored within a specific compilation directory, Compiled libraries are stored within a specific compilation directory,
which by default is set to ``$HOME/.theano/compiledir_xxx``, where which by default is set to ``$HOME/.theano/compiledir_xxx``, where
``xxx`` identifies the platform (under Windows the default location ``xxx`` identifies the platform (under Windows the default location
......
...@@ -57,8 +57,9 @@ import getopt ...@@ -57,8 +57,9 @@ import getopt
from collections import defaultdict from collections import defaultdict
if __name__ == '__main__': if __name__ == '__main__':
# Equivalent of sys.path[0]/../..
throot = "/".join(sys.path[0].split("/")[:-2]) throot = os.path.abspath(
os.path.join(sys.path[0], os.pardir, os.pardir))
options = defaultdict(bool) options = defaultdict(bool)
options.update(dict([x, y or True] for x, y in options.update(dict([x, y or True] for x, y in
...@@ -91,7 +92,7 @@ if __name__ == '__main__': ...@@ -91,7 +92,7 @@ if __name__ == '__main__':
# Make sure the appropriate 'theano' directory is in the PYTHONPATH # Make sure the appropriate 'theano' directory is in the PYTHONPATH
pythonpath = os.environ.get('PYTHONPATH', '') pythonpath = os.environ.get('PYTHONPATH', '')
pythonpath = throot + ':' + pythonpath pythonpath = os.pathsep.join([throot, pythonpath])
os.environ['PYTHONPATH'] = pythonpath os.environ['PYTHONPATH'] = pythonpath
if options['--all'] or options['--epydoc']: if options['--all'] or options['--epydoc']:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论