提交 fe3f5719 authored 作者: Frederic's avatar Frederic

pep8 and fix in python 3 (mixed tab/spaces)

上级 178d49ba
...@@ -11,7 +11,6 @@ from theano.tensor.utils import hash_from_ndarray ...@@ -11,7 +11,6 @@ from theano.tensor.utils import hash_from_ndarray
from theano.tensor.type import TensorType from theano.tensor.type import TensorType
class AsTensorError(TypeError): class AsTensorError(TypeError):
"""Raised when as_tensor_variable isn't able to create a """Raised when as_tensor_variable isn't able to create a
TensorVariable. TensorVariable.
...@@ -560,13 +559,16 @@ class _tensor_py_operators: ...@@ -560,13 +559,16 @@ class _tensor_py_operators:
def swapaxes(self, axis1, axis2): def swapaxes(self, axis1, axis2):
"""Return 'tensor.swapaxes(self, axis1, axis2) """Return 'tensor.swapaxes(self, axis1, axis2)
If a matrix is provided with the right axes, its transpose will be returned. If a matrix is provided with the right axes, its transpose
will be returned.
""" """
return theano.tensor.basic.swapaxes(self, axis1, axis2) return theano.tensor.basic.swapaxes(self, axis1, axis2)
def fill(self, value): def fill(self, value):
"""Fill inputted tensor with the assigned value""" """Fill inputted tensor with the assigned value"""
return theano.tensor.basic.fill(self, value) return theano.tensor.basic.fill(self, value)
class TensorVariable(_tensor_py_operators, Variable): class TensorVariable(_tensor_py_operators, Variable):
"""Subclass to add the tensor operators to the basic `Variable` class.""" """Subclass to add the tensor operators to the basic `Variable` class."""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论