Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9c9a5a51
提交
9c9a5a51
authored
4月 21, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The bug mentioned was fixed in numpy 1.6 and we support 1.6.2 at minimum.
上级
b73adff1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
3 行增加
和
14 行删除
+3
-14
test_basic.py
theano/tensor/tests/test_basic.py
+3
-14
没有找到文件。
theano/tensor/tests/test_basic.py
浏览文件 @
9c9a5a51
...
@@ -5937,17 +5937,8 @@ class test_arithmetic_cast(unittest.TestCase):
...
@@ -5937,17 +5937,8 @@ class test_arithmetic_cast(unittest.TestCase):
config
.
int_division
==
'raise'
)
config
.
int_division
==
'raise'
)
# This is the expected behavior.
# This is the expected behavior.
continue
continue
# For numpy we have a problem:
numpy_dtype
=
op
(
numpy_args
[
0
](
a_type
),
# http://projects.scipy.org/numpy/ticket/1827
numpy_args
[
1
](
b_type
))
.
dtype
# As a result we only consider the highest data
# type that numpy may return.
numpy_dtypes
=
[
op
(
numpy_args
[
0
](
a_type
),
numpy_args
[
1
](
b_type
))
.
dtype
,
op
(
numpy_args
[
1
](
b_type
),
numpy_args
[
0
](
a_type
))
.
dtype
]
numpy_dtype
=
theano
.
scalar
.
upcast
(
*
map
(
str
,
numpy_dtypes
))
if
numpy_dtype
==
theano_dtype
:
if
numpy_dtype
==
theano_dtype
:
# Same data type found, all is good!
# Same data type found, all is good!
continue
continue
...
@@ -5979,9 +5970,7 @@ class test_arithmetic_cast(unittest.TestCase):
...
@@ -5979,9 +5970,7 @@ class test_arithmetic_cast(unittest.TestCase):
# Theano upcasted the result array.
# Theano upcasted the result array.
theano_dtype
==
up_type
and
theano_dtype
==
up_type
and
# But Numpy kept its original type.
# But Numpy kept its original type.
# (not an equality because of numpy bug
array_type
==
numpy_dtype
):
# mentioned above).
array_type
in
numpy_dtypes
):
# Then we accept this difference in
# Then we accept this difference in
# behavior.
# behavior.
continue
continue
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论