Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
06bf027c
提交
06bf027c
authored
9月 16, 2016
作者:
Benjamin Scellier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete options 'full' and 'economic' in test_qr_modes which are both deprecated
上级
938dbc86
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
19 行删除
+6
-19
nlinalg.py
theano/tensor/nlinalg.py
+5
-18
test_nlinalg.py
theano/tensor/tests/test_nlinalg.py
+1
-1
没有找到文件。
theano/tensor/nlinalg.py
浏览文件 @
06bf027c
...
@@ -533,7 +533,7 @@ class QRIncomplete(Op):
...
@@ -533,7 +533,7 @@ class QRIncomplete(Op):
self
.
mode
)
self
.
mode
)
def
qr
(
a
,
mode
=
"
full
"
):
def
qr
(
a
,
mode
=
"
reduced
"
):
"""
"""
Computes the QR decomposition of a matrix.
Computes the QR decomposition of a matrix.
Factor the matrix a as qr, where q
Factor the matrix a as qr, where q
...
@@ -544,7 +544,7 @@ def qr(a, mode="full"):
...
@@ -544,7 +544,7 @@ def qr(a, mode="full"):
a : array_like, shape (M, N)
a : array_like, shape (M, N)
Matrix to be factored.
Matrix to be factored.
mode : {'reduced', 'complete', 'r', 'raw'
, 'full', 'economic'
}, optional
mode : {'reduced', 'complete', 'r', 'raw'}, optional
If K = min(M, N), then
If K = min(M, N), then
'reduced'
'reduced'
...
@@ -559,27 +559,14 @@ def qr(a, mode="full"):
...
@@ -559,27 +559,14 @@ def qr(a, mode="full"):
'raw'
'raw'
returns h, tau with dimensions (N, M), (K,)
returns h, tau with dimensions (N, M), (K,)
'full'
alias of 'reduced', deprecated (default)
'economic'
returns h from 'raw', deprecated.
The options 'reduced', 'complete', and 'raw' are new in numpy
The options 'reduced', 'complete', and 'raw' are new in numpy
1.8, see the notes for more information. The default is
1.8, see the notes for more information. The default is
'reduced' and to maintain backward compatibility with earlier
'reduced' and to maintain backward compatibility with earlier
versions of numpy
both it and the old default 'full'
can be
versions of numpy
it
can be
omitted. Note that array h returned in 'raw' mode is
omitted. Note that array h returned in 'raw' mode is
transposed for calling Fortran. The 'economic' mode is
transposed for calling Fortran.
deprecated. The modes 'full' and 'economic' may be passed
using only the first letter for backwards compatibility, but
all others must be spelled out.
Default mode is 'full' which is also default for numpy 1.6.1.
:note: Default mode was left to full as full and reduced are
Default mode is 'reduced' which is also default for numpy 1.8
both doing the same thing in the new numpy version but only
full works on the old previous numpy version.
Returns
Returns
-------
-------
...
...
theano/tensor/tests/test_nlinalg.py
浏览文件 @
06bf027c
...
@@ -130,7 +130,7 @@ def test_qr_modes():
...
@@ -130,7 +130,7 @@ def test_qr_modes():
n_qr
=
numpy
.
linalg
.
qr
(
a
)
n_qr
=
numpy
.
linalg
.
qr
(
a
)
assert
_allclose
(
n_qr
,
t_qr
)
assert
_allclose
(
n_qr
,
t_qr
)
for
mode
in
[
"reduced"
,
"r"
,
"raw"
,
"full"
,
"economic"
]:
for
mode
in
[
"reduced"
,
"r"
,
"raw"
]:
f
=
function
([
A
],
qr
(
A
,
mode
))
f
=
function
([
A
],
qr
(
A
,
mode
))
t_qr
=
f
(
a
)
t_qr
=
f
(
a
)
n_qr
=
numpy
.
linalg
.
qr
(
a
,
mode
)
n_qr
=
numpy
.
linalg
.
qr
(
a
,
mode
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论