提交 83547c18 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Remove use of deprecated numpy.float

上级 f85a0676
...@@ -166,7 +166,7 @@ class TestSharedVariable: ...@@ -166,7 +166,7 @@ class TestSharedVariable:
with pytest.raises(TypeError): with pytest.raises(TypeError):
f(b, 8) f(b, 8)
b = shared(np.float(7.234), strict=True) b = shared(float(7.234), strict=True)
assert b.type == dscalar assert b.type == dscalar
with pytest.raises(TypeError): with pytest.raises(TypeError):
f(b, 8) f(b, 8)
...@@ -214,8 +214,8 @@ class TestSharedVariable: ...@@ -214,8 +214,8 @@ class TestSharedVariable:
with pytest.raises(TypeError): with pytest.raises(TypeError):
f(b, 8) f(b, 8)
# np.float([7.234]) don't work # float([7.234]) don't work
# b = shared(np.float([7.234]), strict=True) # b = shared(float([7.234]), strict=True)
# assert b.type == dvector # assert b.type == dvector
# with pytest.raises(TypeError): # with pytest.raises(TypeError):
# f(b, 8) # f(b, 8)
...@@ -273,7 +273,7 @@ class TestSharedVariable: ...@@ -273,7 +273,7 @@ class TestSharedVariable:
f(b, 8) f(b, 8)
assert b.get_value() == 8 assert b.get_value() == 8
b = shared(np.float(7.234), allow_downcast=True) b = shared(float(7.234), allow_downcast=True)
assert b.type == dscalar assert b.type == dscalar
f(b, 8) f(b, 8)
assert b.get_value() == 8 assert b.get_value() == 8
...@@ -321,8 +321,8 @@ class TestSharedVariable: ...@@ -321,8 +321,8 @@ class TestSharedVariable:
f(b, [8]) f(b, [8])
assert b.get_value() == 8 assert b.get_value() == 8
# np.float([7.234]) don't work # float([7.234]) don't work
# b = shared(np.float([7.234])) # b = shared(float([7.234]))
# assert b.type == dvector # assert b.type == dvector
# f(b,[8]) # f(b,[8])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论