提交 fb202ecb authored 作者: yobibyte's avatar yobibyte

Updated tensorsolve docstring to silent flake8.

上级 51b3d088
...@@ -797,24 +797,8 @@ def tensorinv(a, ind=2): ...@@ -797,24 +797,8 @@ def tensorinv(a, ind=2):
class TensorSolve(Op): class TensorSolve(Op):
""" """
Theano utilization of numpy.linalg.tensorsolve Theano utilization of numpy.linalg.tensorsolve
Class wrapper for tensorsolve function.
Solve the tensor equation ``a x = b`` for x.
It is assumed that all indices of `x` are summed over in the product,
together with the rightmost indices of `a`, as is done in, for example,
``tensordot(a, x, axes=len(b.shape))``.
Parameters
----------
a : array_like
Coefficient tensor, of shape ``b.shape + Q``. `Q`, a tuple, equals
the shape of that sub-tensor of `a` consisting of the appropriate
number of its rightmost indices, and must be such that
``prod(Q) == prod(b.shape)`` (in which sense `a` is said to be
'square').
b : array_like
Right-hand tensor, which can be of any shape.
axes : tuple of ints, optional
Axes in `a` to reorder to the right, before inversion.
If None (default), no reordering is done.
""" """
_numop = staticmethod(numpy.linalg.tensorsolve) _numop = staticmethod(numpy.linalg.tensorsolve)
__props__ = ('axes', ) __props__ = ('axes', )
...@@ -843,6 +827,7 @@ def tensorsolve(a, b, axes=None): ...@@ -843,6 +827,7 @@ def tensorsolve(a, b, axes=None):
It is assumed that all indices of `x` are summed over in the product, It is assumed that all indices of `x` are summed over in the product,
together with the rightmost indices of `a`, as is done in, for example, together with the rightmost indices of `a`, as is done in, for example,
``tensordot(a, x, axes=len(b.shape))``. ``tensordot(a, x, axes=len(b.shape))``.
Parameters Parameters
---------- ----------
a : array_like a : array_like
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论