Skip to content

Commit 121e951

Browse files
committed
🏷️ fix stubtest errors in lib.recfunctions
1 parent b07323b commit 121e951

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.mypyignore-todo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ numpy._pyinstaller.hook-numpy
1515
numpy.ctypeslib._ctypeslib
1616
numpy.fft.helper
1717

18-
numpy.lib.recfunctions.unstructured_to_structured
19-
2018
numpy.distutils
2119

2220
numpy.f2py.__main__

src/numpy-stubs/lib/recfunctions.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ __all__ = [
3232
"unstructured_to_structured",
3333
]
3434

35+
###
36+
3537
_T = TypeVar("_T")
3638
_ShapeT = TypeVar("_ShapeT", bound=tuple[int, ...])
3739
_ScalarT = TypeVar("_ScalarT", bound=np.generic)
@@ -268,6 +270,16 @@ def unstructured_to_structured(
268270
copy: bool = False,
269271
casting: str = "unsafe",
270272
) -> npt.NDArray[np.void]: ...
273+
@overload
274+
def unstructured_to_structured(
275+
arr: npt.NDArray[Any],
276+
dtype: None = None,
277+
*,
278+
names: _OneOrMany[str],
279+
align: bool = False,
280+
copy: bool = False,
281+
casting: str = "unsafe",
282+
) -> npt.NDArray[np.void]: ...
271283

272284
#
273285
def apply_along_fields(

0 commit comments

Comments
 (0)