提交 1accd7f4 authored 作者: amrithasuresh's avatar amrithasuresh

1. Updated numpy as np

2. Fixed indentation
上级 08e9503f
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
import numpy import numpy as np
from theano.gof.type import Type from theano.gof.type import Type
from theano.gof.graph import Variable, Apply, Constant from theano.gof.graph import Variable, Apply, Constant
from theano.gof.op import Op from theano.gof.op import Op
...@@ -62,8 +62,8 @@ def test_merge_with_weird_eq(): ...@@ -62,8 +62,8 @@ def test_merge_with_weird_eq():
"""numpy arrays don't compare equal like other python objects""" """numpy arrays don't compare equal like other python objects"""
# SCALAR CASE # SCALAR CASE
x = T.constant(numpy.asarray(1), name='x') x = T.constant(np.asarray(1), name='x')
y = T.constant(numpy.asarray(1), name='y') y = T.constant(np.asarray(1), name='y')
g = Env([x, y], [x+y]) g = Env([x, y], [x+y])
MergeOptimizer().optimize(g) MergeOptimizer().optimize(g)
...@@ -74,8 +74,8 @@ def test_merge_with_weird_eq(): ...@@ -74,8 +74,8 @@ def test_merge_with_weird_eq():
# NONSCALAR CASE # NONSCALAR CASE
# This was created to test TensorConstantSignature # This was created to test TensorConstantSignature
x = T.constant(numpy.ones(5), name='x') x = T.constant(np.ones(5), name='x')
y = T.constant(numpy.ones(5), name='y') y = T.constant(np.ones(5), name='y')
g = Env([x, y], [x+y]) g = Env([x, y], [x+y])
MergeOptimizer().optimize(g) MergeOptimizer().optimize(g)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论