Open
Description
Given this code:
# pyright: reportInvalidTypeArguments=false
from numpydantic import NDArray, Shape
def f(
x: NDArray[Shape["2"], float], # noqa: F722
y: NDArray[Shape["2"], float], # noqa: F722
):
return x + y
Pyright warns for the return x + y
statement:
Diagnostics:
1. Operator "+" not supported for types "NDArray" and "NDArray"
Operator "+" not supported for types "H5ArrayPath" and "H5Proxy"
Operator "+" not supported for types "Tuple[Path | str, str]" and "H5Proxy"
Operator "+" not supported for types "H5Proxy" and "H5ArrayPath"
Operator "+" not supported for types "H5Proxy" and "Tuple[Path | str, str]"
Operator "+" not supported for types "H5Proxy" and "H5Proxy" [reportOperatorIssue]
Have I missed some obvious documentation?
numpydantic 1.6.6
pyright 1.1.391
pydantic 2.9.2
python 3.12.6
Metadata
Metadata
Assignees
Labels
No labels