summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Wilson <person142@users.noreply.github.com>2020-06-20 12:51:42 -0700
committerGitHub <noreply@github.com>2020-06-20 12:51:42 -0700
commitbe8ab91f789c3b688d707940016b4c2d262913e9 (patch)
treed004786bd68383591a8e7b216fab777e0c9354cf
parent5390a021ca3842e237d75e328bd47fb334e647f6 (diff)
parent245e536f5c28a6edfb03b4900768559486a81ecd (diff)
downloadnumpy-be8ab91f789c3b688d707940016b4c2d262913e9.tar.gz
Merge pull request #16646 from levistovall/issue-16612-add-test-for-memoryviews-typed-as-ArrayLike
TST: add a static typing test for memoryviews as ArrayLikes
-rw-r--r--numpy/tests/typing/pass/array_like.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/tests/typing/pass/array_like.py b/numpy/tests/typing/pass/array_like.py
index e668b4963..6b823ca7e 100644
--- a/numpy/tests/typing/pass/array_like.py
+++ b/numpy/tests/typing/pass/array_like.py
@@ -14,6 +14,7 @@ x8: ArrayLike = np.array([1, 2, 3])
x9: ArrayLike = [1, 2, 3]
x10: ArrayLike = (1, 2, 3)
x11: ArrayLike = "foo"
+x12: ArrayLike = memoryview(b'foo')
class A:
@@ -21,7 +22,7 @@ class A:
return np.array([1, 2, 3])
-x12: ArrayLike = A()
+x13: ArrayLike = A()
scalar: _SupportsArray = np.int64(1)
scalar.__array__(np.float64)