提交 b2effa54 authored 作者: glorotxa's avatar glorotxa

Review spectral_radius_bound: added an exception and small addition to docstring

上级 bfecc533
......@@ -691,7 +691,10 @@ def spectral_radius_bound(X, log2_exponent):
From V.Pan, 1990. "Estimating the Extremal Eigenvalues of a Symmetric
Matrix", Computers Math Applic. Vol 20 n. 2 pp 17-22.
Rq: an efficient algorithm, not used here, is defined in this paper.
"""
if X.type.ndim != 2:
raise TypeError('spectral_radius_bound requires a matrix argument', X)
XX = X
for i in xrange(log2_exponent):
XX = tensor.dot(XX, XX)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论