summaryrefslogtreecommitdiff
path: root/numpy/typing
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-12-15 14:33:58 +0100
committerBas van Beek <b.f.van.beek@vu.nl>2021-12-15 15:15:36 +0100
commit11f7741953c58daa3a1e7e24d929a25374bc9da2 (patch)
tree04c79103f82d183fcf4a782e1be27c428e6c5aa5 /numpy/typing
parentfe491ec65c468928d32e87c97dd275ba6da7a9d5 (diff)
downloadnumpy-11f7741953c58daa3a1e7e24d929a25374bc9da2.tar.gz
MAINT: Add `np.rec.array` overloads for `None` and file-like objects
Diffstat (limited to 'numpy/typing')
-rw-r--r--numpy/typing/tests/data/reveal/rec.pyi21
1 files changed, 21 insertions, 0 deletions
diff --git a/numpy/typing/tests/data/reveal/rec.pyi b/numpy/typing/tests/data/reveal/rec.pyi
index bf51c82a3..9921621f1 100644
--- a/numpy/typing/tests/data/reveal/rec.pyi
+++ b/numpy/typing/tests/data/reveal/rec.pyi
@@ -104,3 +104,24 @@ reveal_type(np.rec.array( # recarray[Any, dtype[record]]
formats=[np.int64, np.float64],
names=["i8", "f8"]
))
+
+reveal_type(np.rec.array( # recarray[Any, dtype[Any]]
+ None,
+ dtype=np.float64,
+ shape=(10, 3),
+))
+reveal_type(np.rec.array( # recarray[Any, dtype[Any]]
+ None,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"],
+ shape=(10, 3),
+))
+reveal_type(np.rec.array( # recarray[Any, dtype[Any]]
+ file_obj,
+ dtype=np.float64,
+))
+reveal_type(np.rec.array( # recarray[Any, dtype[Any]]
+ file_obj,
+ formats=[np.int64, np.float64],
+ names=["i8", "f8"],
+))