提交 b433d702 authored 作者: Frederic Bastien's avatar Frederic Bastien

Add version added in the library doc

上级 60dbf4be
...@@ -44,6 +44,8 @@ class StripPickler(Pickler): ...@@ -44,6 +44,8 @@ class StripPickler(Pickler):
""" """
Subclass of Pickler that strips unnecessary attributes from Theano objects. Subclass of Pickler that strips unnecessary attributes from Theano objects.
.. versionadded:: 0.8
Example of use:: Example of use::
fn_args = dict(inputs=inputs, fn_args = dict(inputs=inputs,
...@@ -117,6 +119,8 @@ if PY3: ...@@ -117,6 +119,8 @@ if PY3:
""" """
Allow to reload in python 3 some pickled numpy ndarray. Allow to reload in python 3 some pickled numpy ndarray.
.. versionadded:: 0.8
Examples Examples
-------- --------
...@@ -136,6 +140,8 @@ else: ...@@ -136,6 +140,8 @@ else:
""" """
Allow to reload in python 3 some pickled numpy ndarray. Allow to reload in python 3 some pickled numpy ndarray.
.. versionadded:: 0.8
Examples Examples
-------- --------
...@@ -305,6 +311,7 @@ def dump(obj, file_handler, protocol=DEFAULT_PROTOCOL, ...@@ -305,6 +311,7 @@ def dump(obj, file_handler, protocol=DEFAULT_PROTOCOL,
separate NPY file inside of the zip file. separate NPY file inside of the zip file.
:type persistent_id: callable :type persistent_id: callable
.. versionadded:: 0.8
.. note:: .. note::
The final file is simply a zipped file containing at least one file, The final file is simply a zipped file containing at least one file,
...@@ -347,6 +354,7 @@ def load(f, persistent_load=PersistentNdarrayLoad): ...@@ -347,6 +354,7 @@ def load(f, persistent_load=PersistentNdarrayLoad):
used when pickling. used when pickling.
:type persistent_load: callable, optional :type persistent_load: callable, optional
.. versionadded:: 0.8
""" """
with closing(zipfile.ZipFile(f, 'r')) as zip_file: with closing(zipfile.ZipFile(f, 'r')) as zip_file:
p = pickle.Unpickler(BytesIO(zip_file.open('pkl').read())) p = pickle.Unpickler(BytesIO(zip_file.open('pkl').read()))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论