diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-12-15 14:33:58 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-12-15 15:15:36 +0100 |
commit | 11f7741953c58daa3a1e7e24d929a25374bc9da2 (patch) | |
tree | 04c79103f82d183fcf4a782e1be27c428e6c5aa5 /numpy/core/records.pyi | |
parent | fe491ec65c468928d32e87c97dd275ba6da7a9d5 (diff) | |
download | numpy-11f7741953c58daa3a1e7e24d929a25374bc9da2.tar.gz |
MAINT: Add `np.rec.array` overloads for `None` and file-like objects
Diffstat (limited to 'numpy/core/records.pyi')
-rw-r--r-- | numpy/core/records.pyi | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/numpy/core/records.pyi b/numpy/core/records.pyi index fda118276..172bab3ee 100644 --- a/numpy/core/records.pyi +++ b/numpy/core/records.pyi @@ -181,3 +181,57 @@ def array( byteorder: None | _ByteOrder = ..., copy: bool = ..., ) -> _RecArray[record]: ... +@overload +def array( + obj: None, + dtype: DTypeLike, + shape: _ShapeLike, + offset: int = ..., + formats: None = ..., + names: None = ..., + titles: None = ..., + aligned: bool = ..., + byteorder: None = ..., + copy: bool = ..., +) -> _RecArray[Any]: ... +@overload +def array( + obj: None, + dtype: None = ..., + *, + shape: _ShapeLike, + offset: int = ..., + formats: DTypeLike, + names: None | str | Sequence[str] = ..., + titles: None | str | Sequence[str] = ..., + aligned: bool = ..., + byteorder: None | _ByteOrder = ..., + copy: bool = ..., +) -> _RecArray[record]: ... +@overload +def array( + obj: _SupportsReadInto, + dtype: DTypeLike, + shape: None | _ShapeLike = ..., + offset: int = ..., + formats: None = ..., + names: None = ..., + titles: None = ..., + aligned: bool = ..., + byteorder: None = ..., + copy: bool = ..., +) -> _RecArray[Any]: ... +@overload +def array( + obj: _SupportsReadInto, + dtype: None = ..., + shape: None | _ShapeLike = ..., + offset: int = ..., + *, + formats: DTypeLike, + names: None | str | Sequence[str] = ..., + titles: None | str | Sequence[str] = ..., + aligned: bool = ..., + byteorder: None | _ByteOrder = ..., + copy: bool = ..., +) -> _RecArray[record]: ... |