Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
4262045b
提交
4262045b
authored
9月 28, 2014
作者:
pl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Switched usage of pyArray_Empty and Zeros to PyArray_EMPTY and ZEROS and…
Switched usage of pyArray_Empty and Zeros to PyArray_EMPTY and ZEROS and adjusted documentation accordingly
上级
41b43279
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
+12
-12
extending_theano_c.txt
doc/tutorial/extending_theano_c.txt
+12
-12
没有找到文件。
doc/tutorial/extending_theano_c.txt
浏览文件 @
4262045b
...
...
@@ -199,8 +199,8 @@ Creating NumPy ndarrays
The following functions allow the creation and copy of NumPy arrays :
.. method:: PyObject* PyArray_E
mpty(int nd, npy_intp* dims, PyArray_Descr*
dtype,
int fortran)
.. method:: PyObject* PyArray_E
MPTY(int nd, npy_intp* dims, typenum dtype,
int fortran)
Constructs a new ndarray with the number of dimensions specified by nd,
shape specified by dims and data type specified by dtype. If fortran is
...
...
@@ -208,12 +208,12 @@ The following functions allow the creation and copy of NumPy arrays :
is organized in a F-contiguous layout. The array elements are not
initialized in any way.
The
macro PyArray_EMPTY() performs the same function as the function
PyArray_E
mpty() but the data type is given as a typenum instead of
a
pointer to a PyArray_Descr object
.
The
function PyArray_Empty() performs the same function as the macro
PyArray_E
MPTY() but the data type is given as a pointer to
a
PyArray_Descr object instead of a typenum
.
.. method:: PyObject* PyArray_Z
eros(int nd, npy_intp* dims, PyArray_Descr*
dtype,
int fortran)
.. method:: PyObject* PyArray_Z
EROS(int nd, npy_intp* dims, typenum dtype,
int fortran)
Constructs a new ndarray with the number of dimensions specified by nd,
shape specified by dims and data type specified by dtype. If fortran is
...
...
@@ -221,9 +221,9 @@ The following functions allow the creation and copy of NumPy arrays :
is organized in a F-contiguous layout. Every element in the array is
initialized to 0.
The
macro PyArray_ZEROS() performs the same function as the function
PyArray_Z
eros() but the data type is given as a typenum instead of
a
pointer to a PyArray_Descr object.
The
function PyArray_Zeros() performs the same function as the macro
PyArray_Z
EROS() but the data type is given as a pointer to
a
PyArray_Descr object instead of a typenum.
.. method:: PyArrayObject* PyArray_GETCONTIGUOUS(PyObject* op):
...
...
@@ -423,9 +423,9 @@ storage with the right shape and number of dimensions.
Decrease received reference's ref count and allocate new
output variable */
Py_XDECREF(%(z)s);
%(z)s = (PyArrayObject*)PyArray_E
mpty
(1,
%(z)s = (PyArrayObject*)PyArray_E
MPTY
(1,
PyArray_DIMS(%(x)s),
PyArray_
DESCR
(%(x)s),
PyArray_
TYPE
(%(x)s),
0);
if (!%(z)s) {
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论