updated test to use clone function.

tests pass when compiled and run manually.
parent 450a77bb
...@@ -56,7 +56,7 @@ def test_new_zero(a): ...@@ -56,7 +56,7 @@ def test_new_zero(a):
>>> test_new_zero(a) >>> test_new_zero(a)
array('f', [0.0, 0.0, 0.0]) array('f', [0.0, 0.0, 0.0])
""" """
cdef array.array cb = array.zeros_like(a) cdef array.array cb = array.clone(a, len(a), True)
assert cb.length == len(a) assert cb.length == len(a)
return cb return cb
...@@ -111,8 +111,8 @@ def test_likes(a): ...@@ -111,8 +111,8 @@ def test_likes(a):
>>> test_likes(a) >>> test_likes(a)
array('f', [0.0, 0.0, 0.0]) array('f', [0.0, 0.0, 0.0])
""" """
cdef array.array z = array.zeros_like(a) cdef array.array z = array.clone(a, len(a), True)
cdef array.array e = array.empty_like(a) cdef array.array e = array.clone(a, len(a), False)
assert e.length == len(a) assert e.length == len(a)
return z return z
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment