Skip to content

numpy typing doesn't pick up that you can't divide a generic array into a datetime array - wait for numpy-stubs #1475

@Dr-Irv

Description

@Dr-Irv

assert_type(s / left_i, Any) # TODO: numpy/numpy#30173 numpy should reject this

Based on discussions in numpy/numpy#30173 and numpy/numpy#30174, numpy can't fix this issue without breaking other things.

On the other hand, there is a numpy-stubs project in the works, so once that is released, we could require that with pandas-stubs and it might resolve our issue.

@cmp0xff FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions