summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-09-09 13:20:20 +0200
committerSebastian Berg <sebastianb@nvidia.com>2022-10-12 10:41:40 +0200
commitd53a2b6ef0fc3380899a6a61f46507ecd6b8e419 (patch)
treed8b6d2db9b44ea45ba1c84790cae2ff54af69611
parentc4f1419c0484e2772f181210bfc7a9b86267a5d3 (diff)
downloadnumpy-d53a2b6ef0fc3380899a6a61f46507ecd6b8e419.tar.gz
TST: Avoid possible warning from unnecessary cast with uninitialized values
This should be fixed in `choose` to not do the unnecessary cast, see gh-22237.
-rw-r--r--numpy/typing/tests/data/pass/ndarray_misc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/typing/tests/data/pass/ndarray_misc.py b/numpy/typing/tests/data/pass/ndarray_misc.py
index 62024603c..19a1af9e2 100644
--- a/numpy/typing/tests/data/pass/ndarray_misc.py
+++ b/numpy/typing/tests/data/pass/ndarray_misc.py
@@ -21,7 +21,7 @@ B0 = np.empty((), dtype=np.int32).view(SubClass)
B1 = np.empty((1,), dtype=np.int32).view(SubClass)
B2 = np.empty((1, 1), dtype=np.int32).view(SubClass)
C: np.ndarray[Any, np.dtype[np.int32]] = np.array([0, 1, 2], dtype=np.int32)
-D = np.empty(3).view(SubClass)
+D = np.ones(3).view(SubClass)
i4.all()
A.all()