summaryrefslogtreecommitdiff
path: root/numpy/typing
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2022-02-21 17:07:49 +0100
committerBas van Beek <43369155+BvB93@users.noreply.github.com>2022-02-21 17:30:22 +0100
commit3a3125caa3114b51c428b7992436807f8b5c90ed (patch)
treedc19c1ba588dc05e6b9dd6aa0ea157617a49d422 /numpy/typing
parent01b851aa844adc323e74e35a4effd3e8932347ce (diff)
downloadnumpy-3a3125caa3114b51c428b7992436807f8b5c90ed.tar.gz
TYP,MAINT: Explicitly allow sequences of array-likes in `np.concatenate`
Diffstat (limited to 'numpy/typing')
-rw-r--r--numpy/typing/tests/data/reveal/array_constructors.pyi5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/typing/tests/data/reveal/array_constructors.pyi b/numpy/typing/tests/data/reveal/array_constructors.pyi
index c629454df..52aabd126 100644
--- a/numpy/typing/tests/data/reveal/array_constructors.pyi
+++ b/numpy/typing/tests/data/reveal/array_constructors.pyi
@@ -39,6 +39,11 @@ reveal_type(np.empty([1, 5, 6], dtype=np.int64)) # E: ndarray[Any, dtype[{int64
reveal_type(np.empty([1, 5, 6], dtype='c16')) # E: ndarray[Any, dtype[Any]]
reveal_type(np.concatenate(A)) # E: ndarray[Any, dtype[{float64}]]
+reveal_type(np.concatenate([A, A])) # E: Any
+reveal_type(np.concatenate([[1], A])) # E: ndarray[Any, dtype[Any]]
+reveal_type(np.concatenate([[1], [1]])) # E: ndarray[Any, dtype[Any]]
+reveal_type(np.concatenate((A, A))) # E: ndarray[Any, dtype[{float64}]]
+reveal_type(np.concatenate(([1], [1]))) # E: ndarray[Any, dtype[Any]]
reveal_type(np.concatenate([1, 1.0])) # E: ndarray[Any, dtype[Any]]
reveal_type(np.concatenate(A, dtype=np.int64)) # E: ndarray[Any, dtype[{int64}]]
reveal_type(np.concatenate(A, dtype='c16')) # E: ndarray[Any, dtype[Any]]