Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9fd1db06
提交
9fd1db06
authored
11月 04, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update manually scan cython file to new numpy c api.
Manually updated scan c code version too.
上级
977d623d
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
22 行删除
+22
-22
scan_perform.c
theano/scan_module/scan_perform.c
+21
-21
scan_perform_ext.py
theano/scan_module/scan_perform_ext.py
+1
-1
没有找到文件。
theano/scan_module/scan_perform.c
浏览文件 @
9fd1db06
...
@@ -1492,7 +1492,7 @@ static PyObject *__pyx_pw_6theano_11scan_module_12scan_perform_1get_version(PyOb
...
@@ -1492,7 +1492,7 @@ static PyObject *__pyx_pw_6theano_11scan_module_12scan_perform_1get_version(PyOb
*
*
*
*
* def get_version(): # <<<<<<<<<<<<<<
* def get_version(): # <<<<<<<<<<<<<<
* return 0.2
79
* return 0.2
80
*
*
*/
*/
...
@@ -1508,12 +1508,12 @@ static PyObject *__pyx_pf_6theano_11scan_module_12scan_perform_get_version(CYTHO
...
@@ -1508,12 +1508,12 @@ static PyObject *__pyx_pf_6theano_11scan_module_12scan_perform_get_version(CYTHO
/* "theano/scan_module/scan_perform.pyx":65
/* "theano/scan_module/scan_perform.pyx":65
*
*
* def get_version():
* def get_version():
* return 0.2
79
# <<<<<<<<<<<<<<
* return 0.2
80
# <<<<<<<<<<<<<<
*
*
* @cython.boundscheck(False)
* @cython.boundscheck(False)
*/
*/
__Pyx_XDECREF
(
__pyx_r
);
__Pyx_XDECREF
(
__pyx_r
);
__pyx_t_1
=
PyFloat_FromDouble
(
0
.
2
79
);
if
(
unlikely
(
!
__pyx_t_1
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
65
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
__pyx_t_1
=
PyFloat_FromDouble
(
0
.
2
80
);
if
(
unlikely
(
!
__pyx_t_1
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
65
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
__Pyx_GOTREF
(
__pyx_t_1
);
__Pyx_GOTREF
(
__pyx_t_1
);
__pyx_r
=
__pyx_t_1
;
__pyx_r
=
__pyx_t_1
;
__pyx_t_1
=
0
;
__pyx_t_1
=
0
;
...
@@ -5226,7 +5226,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5226,7 +5226,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
* copy_shape = 0
* copy_shape = 0
*
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous")
* raise ValueError(u"ndarray is not C contiguous")
*/
*/
__pyx_t_1
=
(((
__pyx_v_flags
&
PyBUF_C_CONTIGUOUS
)
==
PyBUF_C_CONTIGUOUS
)
!=
0
);
__pyx_t_1
=
(((
__pyx_v_flags
&
PyBUF_C_CONTIGUOUS
)
==
PyBUF_C_CONTIGUOUS
)
!=
0
);
...
@@ -5235,11 +5235,11 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5235,11 +5235,11 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/* "numpy.pxd":214
/* "numpy.pxd":214
*
*
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
C_CONTIGUOUS)): # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not C contiguous")
* raise ValueError(u"ndarray is not C contiguous")
*
*
*/
*/
__pyx_t_2
=
((
!
(
PyArray_CHKFLAGS
(
__pyx_v_self
,
NPY_C_CONTIGUOUS
)
!=
0
))
!=
0
);
__pyx_t_2
=
((
!
(
PyArray_CHKFLAGS
(
__pyx_v_self
,
NPY_
ARRAY_
C_CONTIGUOUS
)
!=
0
))
!=
0
);
__pyx_t_3
=
__pyx_t_2
;
__pyx_t_3
=
__pyx_t_2
;
}
else
{
}
else
{
__pyx_t_3
=
__pyx_t_1
;
__pyx_t_3
=
__pyx_t_1
;
...
@@ -5248,7 +5248,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5248,7 +5248,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/* "numpy.pxd":215
/* "numpy.pxd":215
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
*
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
...
@@ -5266,7 +5266,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5266,7 +5266,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
* raise ValueError(u"ndarray is not C contiguous")
* raise ValueError(u"ndarray is not C contiguous")
*
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous")
* raise ValueError(u"ndarray is not Fortran contiguous")
*/
*/
__pyx_t_3
=
(((
__pyx_v_flags
&
PyBUF_F_CONTIGUOUS
)
==
PyBUF_F_CONTIGUOUS
)
!=
0
);
__pyx_t_3
=
(((
__pyx_v_flags
&
PyBUF_F_CONTIGUOUS
)
==
PyBUF_F_CONTIGUOUS
)
!=
0
);
...
@@ -5275,11 +5275,11 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5275,11 +5275,11 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/* "numpy.pxd":218
/* "numpy.pxd":218
*
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
F_CONTIGUOUS)): # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not Fortran contiguous")
* raise ValueError(u"ndarray is not Fortran contiguous")
*
*
*/
*/
__pyx_t_1
=
((
!
(
PyArray_CHKFLAGS
(
__pyx_v_self
,
NPY_F_CONTIGUOUS
)
!=
0
))
!=
0
);
__pyx_t_1
=
((
!
(
PyArray_CHKFLAGS
(
__pyx_v_self
,
NPY_
ARRAY_
F_CONTIGUOUS
)
!=
0
))
!=
0
);
__pyx_t_2
=
__pyx_t_1
;
__pyx_t_2
=
__pyx_t_1
;
}
else
{
}
else
{
__pyx_t_2
=
__pyx_t_3
;
__pyx_t_2
=
__pyx_t_3
;
...
@@ -5288,7 +5288,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5288,7 +5288,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
/* "numpy.pxd":219
/* "numpy.pxd":219
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
*
*
* info.buf = PyArray_DATA(self)
* info.buf = PyArray_DATA(self)
...
@@ -5444,7 +5444,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
...
@@ -5444,7 +5444,7 @@ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, P
* cdef list stack
* cdef list stack
* cdef int offset
* cdef int offset
*/
*/
__pyx_t_4
=
((
PyObject
*
)
__pyx_v_self
->
descr
);
__pyx_t_4
=
((
PyObject
*
)
PyArray_DESCR
(
__pyx_v_self
)
);
__Pyx_INCREF
(
__pyx_t_4
);
__Pyx_INCREF
(
__pyx_t_4
);
__pyx_v_descr
=
((
PyArray_Descr
*
)
__pyx_t_4
);
__pyx_v_descr
=
((
PyArray_Descr
*
)
__pyx_t_4
);
__pyx_t_4
=
0
;
__pyx_t_4
=
0
;
...
@@ -6973,7 +6973,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
...
@@ -6973,7 +6973,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
* arr.base = baseptr
* arr.base = baseptr
*
*
*/
*/
Py_XDECREF
(
__pyx_v_arr
->
base
);
Py_XDECREF
(
PyArray_BASE
(
__pyx_v_arr
)
);
/* "numpy.pxd":973
/* "numpy.pxd":973
* baseptr = <PyObject*>base
* baseptr = <PyObject*>base
...
@@ -6982,7 +6982,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
...
@@ -6982,7 +6982,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a
*
*
* cdef inline object get_array_base(ndarray arr):
* cdef inline object get_array_base(ndarray arr):
*/
*/
__pyx_v_arr
->
base
=
__pyx_v_baseptr
;
PyArray_SetBaseObject
(
__pyx_v_arr
,
__pyx_v_baseptr
)
;
__Pyx_RefNannyFinishContext
();
__Pyx_RefNannyFinishContext
();
}
}
...
@@ -7008,7 +7008,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
...
@@ -7008,7 +7008,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
* return None
* return None
* else:
* else:
*/
*/
__pyx_t_1
=
((
__pyx_v_arr
->
base
==
NULL
)
!=
0
);
__pyx_t_1
=
((
PyArray_BASE
(
__pyx_v_arr
)
==
NULL
)
!=
0
);
if
(
__pyx_t_1
)
{
if
(
__pyx_t_1
)
{
/* "numpy.pxd":977
/* "numpy.pxd":977
...
@@ -7032,8 +7032,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
...
@@ -7032,8 +7032,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py
* return <object>arr.base # <<<<<<<<<<<<<<
* return <object>arr.base # <<<<<<<<<<<<<<
*/
*/
__Pyx_XDECREF
(
__pyx_r
);
__Pyx_XDECREF
(
__pyx_r
);
__Pyx_INCREF
(((
PyObject
*
)
__pyx_v_arr
->
base
));
__Pyx_INCREF
(((
PyObject
*
)
PyArray_BASE
(
__pyx_v_arr
)
));
__pyx_r
=
((
PyObject
*
)
__pyx_v_arr
->
base
);
__pyx_r
=
((
PyObject
*
)
PyArray_BASE
(
__pyx_v_arr
)
);
goto
__pyx_L0
;
goto
__pyx_L0
;
}
}
__pyx_L3:
;
__pyx_L3:
;
...
@@ -7310,7 +7310,7 @@ static int __Pyx_InitCachedConstants(void) {
...
@@ -7310,7 +7310,7 @@ static int __Pyx_InitCachedConstants(void) {
/* "numpy.pxd":215
/* "numpy.pxd":215
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
C_CONTIGUOUS)):
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
*
*
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
...
@@ -7321,7 +7321,7 @@ static int __Pyx_InitCachedConstants(void) {
...
@@ -7321,7 +7321,7 @@ static int __Pyx_InitCachedConstants(void) {
/* "numpy.pxd":219
/* "numpy.pxd":219
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
* and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)):
* and not PyArray_CHKFLAGS(self, NPY_
ARRAY_
F_CONTIGUOUS)):
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
* raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
*
*
* info.buf = PyArray_DATA(self)
* info.buf = PyArray_DATA(self)
...
@@ -7378,7 +7378,7 @@ static int __Pyx_InitCachedConstants(void) {
...
@@ -7378,7 +7378,7 @@ static int __Pyx_InitCachedConstants(void) {
*
*
*
*
* def get_version(): # <<<<<<<<<<<<<<
* def get_version(): # <<<<<<<<<<<<<<
* return 0.2
79
* return 0.2
80
*
*
*/
*/
__pyx_k_codeobj_30
=
(
PyObject
*
)
__Pyx_PyCode_New
(
0
,
0
,
0
,
0
,
0
,
__pyx_empty_bytes
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_kp_s_31
,
__pyx_n_s__get_version
,
64
,
__pyx_empty_bytes
);
if
(
unlikely
(
!
__pyx_k_codeobj_30
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
64
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
__pyx_k_codeobj_30
=
(
PyObject
*
)
__Pyx_PyCode_New
(
0
,
0
,
0
,
0
,
0
,
__pyx_empty_bytes
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_empty_tuple
,
__pyx_kp_s_31
,
__pyx_n_s__get_version
,
64
,
__pyx_empty_bytes
);
if
(
unlikely
(
!
__pyx_k_codeobj_30
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
64
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
...
@@ -7598,7 +7598,7 @@ PyMODINIT_FUNC PyInit_scan_perform(void)
...
@@ -7598,7 +7598,7 @@ PyMODINIT_FUNC PyInit_scan_perform(void)
*
*
*
*
* def get_version(): # <<<<<<<<<<<<<<
* def get_version(): # <<<<<<<<<<<<<<
* return 0.2
79
* return 0.2
80
*
*
*/
*/
__pyx_t_2
=
PyCFunction_NewEx
(
&
__pyx_mdef_6theano_11scan_module_12scan_perform_1get_version
,
NULL
,
__pyx_n_s_32
);
if
(
unlikely
(
!
__pyx_t_2
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
64
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
__pyx_t_2
=
PyCFunction_NewEx
(
&
__pyx_mdef_6theano_11scan_module_12scan_perform_1get_version
,
NULL
,
__pyx_n_s_32
);
if
(
unlikely
(
!
__pyx_t_2
))
{
__pyx_filename
=
__pyx_f
[
0
];
__pyx_lineno
=
64
;
__pyx_clineno
=
__LINE__
;
goto
__pyx_L1_error
;}
...
...
theano/scan_module/scan_perform_ext.py
浏览文件 @
9fd1db06
...
@@ -11,7 +11,7 @@ _logger = logging.getLogger('theano.scan_module.scan_perform')
...
@@ -11,7 +11,7 @@ _logger = logging.getLogger('theano.scan_module.scan_perform')
_logger
.
setLevel
(
logging
.
WARN
)
_logger
.
setLevel
(
logging
.
WARN
)
version
=
0.2
79
# must match constant returned in function get_version()
version
=
0.2
80
# must match constant returned in function get_version()
need_reload
=
False
need_reload
=
False
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论