You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command-line arguments for stubgen that when enabled will remove unsupported annotations from numpy.ndarray and List
like numpy.ndarray[numpy.float32[3,1]] and List[float[3]] which pybind11 outputs.
FYI: This feature has been implemented for numpy.ndarray in pybind11-stubgen.
Pitch
The stubs generated from extensions made with pybind11 using mypy.stubs are invalid when Eigen types or std::array are used in the interface.
will give the following errors when used together with Mypy:
error: Bad number of arguments for type alias, expected: 0, given: 2error: "ndarray" expects 2 type arguments, but 1 givenerror: Invalid type: try using Literal[2] instead?error: Invalid type: try using Literal[1] instead?
Feature
Command-line arguments for
stubgen
that when enabled will remove unsupported annotations fromnumpy.ndarray
andList
like
numpy.ndarray[numpy.float32[3,1]]
andList[float[3]]
which pybind11 outputs.FYI: This feature has been implemented for
numpy.ndarray
in pybind11-stubgen.Pitch
The stubs generated from extensions made with pybind11 using
mypy.stubs
are invalid when Eigen types orstd::array
are used in the interface.As an example, this output from
stubgen
,will give the following errors when used together with Mypy:
And this
will give these errors:
The text was updated successfully, but these errors were encountered: