Skip to content

Commit e29685e

Browse files
committed
Add tests per PR review by @antonwolfy
1 parent f782d1c commit e29685e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_fill.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,20 @@ def test_fill_memset(order):
5959
a.fill(0)
6060

6161
assert_array_equal(a, 0)
62+
63+
64+
def test_fill_float_complex_to_int():
65+
a = dnp.ones((10, 10), dtype="i4")
66+
67+
a.fill(complex(2, 0))
68+
assert_array_equal(a, 2)
69+
70+
a.fill(float(3))
71+
assert_array_equal(a, 3)
72+
73+
74+
def test_fill_complex_to_float():
75+
a = dnp.ones((10, 10), dtype="f4")
76+
77+
a.fill(complex(2, 0))
78+
assert_array_equal(a, 2)

0 commit comments

Comments
 (0)