Skip to content

Addition of a Series[int] with a complex returns Series[unknown] #1098

Open
@loicdiridollou

Description

import pandas as pd

c = 1 + 1j
s = pd.Series([1.0, 2.0, 3.0])

check(assert_type(s + c, "pd.Series[complex]"), pd.Series) ■ "assert_type" mismatch: expected "Series[complex]" but received "Series[unknown]"

Please complete the following information:

OS: Darwin
OS Version [e.g. 22]: 15.2
python version: 3.12.7
version of type checker: mypy latest
version of installed pandas-stubs: latest
Additional context

version of pandas: 2.2.3
mypy option: strict=False

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions