提交 9a925e49 authored 作者: Frederic Bastien's avatar Frederic Bastien

Add docstring

上级 3ca887f8
...@@ -685,6 +685,14 @@ class lstsq(Op): ...@@ -685,6 +685,14 @@ class lstsq(Op):
def matrix_power(M, n): def matrix_power(M, n):
"""
Raise a square matrix to the (integer) power n.
Parameters
----------
M : Tensor variable
n : Python int
"""
result = 1 result = 1
for i in xrange(n): for i in xrange(n):
result = theano.dot(result, M) result = theano.dot(result, M)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论