10000 TYP: subtracting two np.ndarrays is of type NoReturn · Issue #20568 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content
TYP: subtracting two np.ndarrays is of type NoReturn #20568
Closed
@twoertwein

Description

@twoertwein

Describe the issue:

Subtracting two np.ndarrays is infered to "return" NoReturn.

See microsoft/pyright#2696 (comment) for @erictraut's analysis into why pyright infers NoReturn.

Reproduce the code example:

import numpy as np

reveal_type(np.zeros(1) - np.zeros(1))

Error message:

pyright: Type of "np.zeros(1) - np.zeros(1)" is "NoReturn"

NumPy/Python version information:

1.21.4, 3.9.6

Metadata

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

      0