Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
f2944019
提交
f2944019
authored
11月 09, 2011
作者:
Olivier Delalleau
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Typo fix: casted -> cast (in doc .txt files)
上级
cf29269f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
4 行增加
和
4 行删除
+4
-4
op.txt
doc/extending/op.txt
+1
-1
type.txt
doc/extending/type.txt
+1
-1
pfunc.txt
doc/proposals/pfunc.txt
+2
-2
没有找到文件。
doc/extending/op.txt
浏览文件 @
f2944019
...
@@ -333,7 +333,7 @@ In the following code, we use our new Op:
...
@@ -333,7 +333,7 @@ In the following code, we use our new Op:
Note that there is an implicit call to
Note that there is an implicit call to
``double.filter()`` on each argument, so if we give integers as inputs
``double.filter()`` on each argument, so if we give integers as inputs
they are magically cast
ed
to the right type. Now, what if we try this?
they are magically cast to the right type. Now, what if we try this?
>>> x = double('x')
>>> x = double('x')
>>> z = mul(x, 2)
>>> z = mul(x, 2)
...
...
doc/extending/type.txt
浏览文件 @
f2944019
...
@@ -27,7 +27,7 @@ default values.
...
@@ -27,7 +27,7 @@ default values.
.. method:: filter(value, strict=False, allow_downcast=None)
.. method:: filter(value, strict=False, allow_downcast=None)
This casts a value to match the Type and returns the
This casts a value to match the Type and returns the
cast
ed
value. If ``value`` is incompatible with the Type,
cast value. If ``value`` is incompatible with the Type,
the method must raise an exception. If ``strict`` is True, ``filter`` must return a
the method must raise an exception. If ``strict`` is True, ``filter`` must return a
reference to ``value`` (i.e. casting prohibited).
reference to ``value`` (i.e. casting prohibited).
If ``strict`` is False, then casting may happen, but downcasting should
If ``strict`` is False, then casting may happen, but downcasting should
...
...
doc/proposals/pfunc.txt
浏览文件 @
f2944019
...
@@ -64,7 +64,7 @@ The proposal is for two new ways of creating a *shared* variable:
...
@@ -64,7 +64,7 @@ The proposal is for two new ways of creating a *shared* variable:
:param value: A value to associate with this variable (a new container will be created).
:param value: A value to associate with this variable (a new container will be created).
:param strict: True -> assignments to .value will not be cast
ed
or copied, so they must
:param strict: True -> assignments to .value will not be cast or copied, so they must
have the correct type.
have the correct type.
:param container: The container to use for this variable. Illegal to pass this as well
:param container: The container to use for this variable. Illegal to pass this as well
...
@@ -185,7 +185,7 @@ Corner cases and exotic examples can be found in the tests.
...
@@ -185,7 +185,7 @@ Corner cases and exotic examples can be found in the tests.
:param mutable: True -> function is allowed to modify this argument.
:param mutable: True -> function is allowed to modify this argument.
:param strict: False -> function arguments may be copied or cast
ed
to match the
:param strict: False -> function arguments may be copied or cast to match the
type required by the parameter `variable`. True -> function arguments must exactly match the type
type required by the parameter `variable`. True -> function arguments must exactly match the type
required by `variable`.
required by `variable`.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论