Skip to content

Commit 23b588c

Browse files
author
shirzady1934
committed
issue 1098 added test for complex in Series __add__ operator
1 parent 7cabb19 commit 23b588c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_series.py

+6
Original file line numberDiff line numberDiff line change
@@ -3538,6 +3538,12 @@ def test_series_reindex() -> None:
35383538
check(assert_type(s.reindex([2, 1, 0]), "pd.Series[int]"), pd.Series, np.integer)
35393539

35403540

3541+
def test_series_add_complex() -> None:
3542+
c = 1 + 1j
3543+
s = pd.Series([1.0, 2.0, 3.0])
3544+
check(assert_type(s + c, "pd.Series[complex]"), pd.Series)
3545+
3546+
35413547
def test_series_reindex_like() -> None:
35423548
s = pd.Series([1, 2, 3], index=[0, 1, 2])
35433549
other = pd.Series([1, 2], index=[1, 0])

0 commit comments

Comments
 (0)