Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5aebc410
提交
5aebc410
authored
6月 26, 2015
作者:
Iban Harlouchet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
flake 8 for tensor/var.py
上级
c7340d33
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
10 行删除
+8
-10
var.py
theano/tensor/var.py
+8
-9
test_flake8.py
theano/tests/test_flake8.py
+0
-1
没有找到文件。
theano/tensor/var.py
浏览文件 @
5aebc410
import
copy
import
copy
import
pdb
import
sys
import
traceback
as
tb
import
traceback
as
tb
import
warnings
import
warnings
...
@@ -41,9 +39,9 @@ class _tensor_py_operators:
...
@@ -41,9 +39,9 @@ class _tensor_py_operators:
# CASTS
# CASTS
# REMOVED THESE BECAUSE PYTHON appears to require __int__ to return
# REMOVED THESE BECAUSE PYTHON appears to require __int__ to return
# an int. -JB 20081112
# an int. -JB 20081112
#def __int__(self): return convert_to_int32(self)
#
def __int__(self): return convert_to_int32(self)
#def __float__(self): return convert_to_float64(self)
#
def __float__(self): return convert_to_float64(self)
#def __complex__(self): return convert_to_complex128(self)
#
def __complex__(self): return convert_to_complex128(self)
# COMPARISONS
# COMPARISONS
_is_nonzero
=
True
_is_nonzero
=
True
...
@@ -215,7 +213,7 @@ class _tensor_py_operators:
...
@@ -215,7 +213,7 @@ class _tensor_py_operators:
# DO NOT USE THESE BECAUSE INPLACE OPS SHOULD BE INSERTED
# DO NOT USE THESE BECAUSE INPLACE OPS SHOULD BE INSERTED
# BY OPTIMIZATIONS ONLY
# BY OPTIMIZATIONS ONLY
#
#
ARITHMETIC - INPLACE
# ARITHMETIC - INPLACE
# def __iadd__(self, other):
# def __iadd__(self, other):
# return _add_inplace(self, other)
# return _add_inplace(self, other)
# def __isub__(self, other):
# def __isub__(self, other):
...
@@ -642,7 +640,8 @@ class TensorVariable(_tensor_py_operators, Variable):
...
@@ -642,7 +640,8 @@ class TensorVariable(_tensor_py_operators, Variable):
elif
config
.
warn_float64
==
"raise"
:
elif
config
.
warn_float64
==
"raise"
:
raise
Exception
(
msg
)
raise
Exception
(
msg
)
elif
config
.
warn_float64
==
'pdb'
:
elif
config
.
warn_float64
==
'pdb'
:
import
pdb
;
pdb
.
set_trace
()
import
pdb
pdb
.
set_trace
()
TensorType
.
Variable
=
TensorVariable
TensorType
.
Variable
=
TensorVariable
...
@@ -744,8 +743,8 @@ class TensorConstant(_tensor_py_operators, Constant):
...
@@ -744,8 +743,8 @@ class TensorConstant(_tensor_py_operators, Constant):
def
__init__
(
self
,
type
,
data
,
name
=
None
):
def
__init__
(
self
,
type
,
data
,
name
=
None
):
Constant
.
__init__
(
self
,
type
,
data
,
name
)
Constant
.
__init__
(
self
,
type
,
data
,
name
)
if
(
isinstance
(
data
,
numpy
.
ndarray
)
and
if
(
isinstance
(
data
,
numpy
.
ndarray
)
and
data
.
ndim
>
0
and
data
.
ndim
>
0
and
len
(
numpy
.
unique
(
data
))
==
1
):
len
(
numpy
.
unique
(
data
))
==
1
):
self
.
tag
.
unique_value
=
numpy
.
unique
(
data
)[
0
]
self
.
tag
.
unique_value
=
numpy
.
unique
(
data
)[
0
]
else
:
else
:
self
.
tag
.
unique_value
=
None
self
.
tag
.
unique_value
=
None
...
...
theano/tests/test_flake8.py
浏览文件 @
5aebc410
...
@@ -57,7 +57,6 @@ whitelist_flake8 = [
...
@@ -57,7 +57,6 @@ whitelist_flake8 = [
"typed_list/tests/test_type.py"
,
"typed_list/tests/test_type.py"
,
"typed_list/tests/test_opt.py"
,
"typed_list/tests/test_opt.py"
,
"typed_list/tests/test_basic.py"
,
"typed_list/tests/test_basic.py"
,
"tensor/var.py"
,
"tensor/sharedvar.py"
,
"tensor/sharedvar.py"
,
"tensor/inplace.py"
,
"tensor/inplace.py"
,
"tensor/slinalg.py"
,
"tensor/slinalg.py"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论