提交 88ed6c3e authored 作者: Frederic's avatar Frederic

remove variable not used and add test for astype.

上级 91ee724c
......@@ -2016,7 +2016,6 @@ def test_identity():
class CastTester(unittest.TestCase):
def test_good_between_real_types(self):
expected = lambda x, y: x.astype(y),
good = itertools.chain(
multi_dtype_cast_checks((2,), dtypes=REAL_DTYPES),
# Casts from foo to foo
......@@ -2029,6 +2028,10 @@ class CastTester(unittest.TestCase):
f = function([inp], out)
assert f(obj).dtype == numpy.dtype(dtype)
# Test astype too
out2 = inp.astype(dtype=dtype)
assert out2.type == out.type
def test_cast_from_real_to_complex(self):
for real_dtype in REAL_DTYPES:
for complex_dtype in COMPLEX_DTYPES:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论