Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
32f8a112
提交
32f8a112
authored
10月 07, 2015
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Filter warning about 'numpy.ndarray size changed'
上级
6ca7b2b6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
11 行增加
和
2 行删除
+11
-2
cmodule.py
theano/gof/cmodule.py
+5
-1
scan_perform_ext.py
theano/scan_module/scan_perform_ext.py
+6
-1
没有找到文件。
theano/gof/cmodule.py
浏览文件 @
32f8a112
...
@@ -17,6 +17,7 @@ import tempfile
...
@@ -17,6 +17,7 @@ import tempfile
import
time
import
time
import
platform
import
platform
import
distutils.sysconfig
import
distutils.sysconfig
import
warnings
import
numpy.distutils
# TODO: TensorType should handle this
import
numpy.distutils
# TODO: TensorType should handle this
...
@@ -324,7 +325,10 @@ def dlimport(fullpath, suffix=None):
...
@@ -324,7 +325,10 @@ def dlimport(fullpath, suffix=None):
if
hasattr
(
importlib
,
"invalidate_caches"
):
if
hasattr
(
importlib
,
"invalidate_caches"
):
importlib
.
invalidate_caches
()
importlib
.
invalidate_caches
()
t0
=
time
.
time
()
t0
=
time
.
time
()
rval
=
__import__
(
module_name
,
{},
{},
[
module_name
])
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
"ignore"
,
message
=
"numpy.ndarray size changed"
)
rval
=
__import__
(
module_name
,
{},
{},
[
module_name
])
t1
=
time
.
time
()
t1
=
time
.
time
()
import_time
+=
t1
-
t0
import_time
+=
t1
-
t0
if
not
rval
:
if
not
rval
:
...
...
theano/scan_module/scan_perform_ext.py
浏览文件 @
32f8a112
...
@@ -132,5 +132,10 @@ except ImportError:
...
@@ -132,5 +132,10 @@ except ImportError:
# Release lock on compilation directory.
# Release lock on compilation directory.
release_lock
()
release_lock
()
from
scan_perform.scan_perform
import
*
# This is caused as cython use the old NumPy C-API but we use the new one.
# To fix it completly, we would need to modify Cython to use the new API.
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
"ignore"
,
message
=
"numpy.ndarray size changed"
)
from
scan_perform.scan_perform
import
*
assert
version
==
get_version
()
assert
version
==
get_version
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论