From efc850b89e4c235bea06e72af20b791131d94c8c Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Mon, 9 May 2022 18:29:23 +0200 Subject: [PATCH 1/2] TYP,ENH: Add the new `quotechar` parameter to `np.loadtxt` --- numpy/lib/npyio.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/numpy/lib/npyio.pyi b/numpy/lib/npyio.pyi index 231ed75842d2..8007b2dc717b 100644 --- a/numpy/lib/npyio.pyi +++ b/numpy/lib/npyio.pyi @@ -143,6 +143,7 @@ def loadtxt( encoding: None | str = ..., max_rows: None | int = ..., *, + quotechar: None | str = ..., like: None | _SupportsArrayFunc = ... ) -> NDArray[float64]: ... @overload @@ -159,6 +160,7 @@ def loadtxt( encoding: None | str = ..., max_rows: None | int = ..., *, + quotechar: None | str = ..., like: None | _SupportsArrayFunc = ... ) -> NDArray[_SCT]: ... @overload @@ -175,6 +177,7 @@ def loadtxt( encoding: None | str = ..., max_rows: None | int = ..., *, + quotechar: None | str = ..., like: None | _SupportsArrayFunc = ... ) -> NDArray[Any]: ... From e13bc2c02110e34a2ce685fb3f3321b1d0e84993 Mon Sep 17 00:00:00 2001 From: Bas van Beek <43369155+BvB93@users.noreply.github.com> Date: Mon, 9 May 2022 18:30:22 +0200 Subject: [PATCH 2/2] TYP,STY: Use PEP 570 for denoting the `from_dlpack`'s positional-only parameter --- numpy/__init__.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/__init__.pyi b/numpy/__init__.pyi index f22692c02cd5..570d84c1cc35 100644 --- a/numpy/__init__.pyi +++ b/numpy/__init__.pyi @@ -4368,4 +4368,4 @@ class chararray(ndarray[_ShapeType, _CharDType]): class _SupportsDLPack(Protocol[_T_contra]): def __dlpack__(self, *, stream: None | _T_contra = ...) -> _PyCapsule: ... -def from_dlpack(__obj: _SupportsDLPack[None]) -> NDArray[Any]: ... +def from_dlpack(obj: _SupportsDLPack[None], /) -> NDArray[Any]: ...