Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- env-llmeval/lib/python3.10/site-packages/numpy/core/tests/data/numpy_2_0_array.pkl +3 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/__init__.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/test_runtime.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/test_typing.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/array_pad.pyi +6 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi +14 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/char.pyi +66 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/chararray.pyi +62 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/constants.pyi +7 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/datasource.pyi +15 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi +12 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/false_positives.pyi +11 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi +161 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi +14 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi +13 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/memmap.pyi +5 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray.pyi +11 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi +17 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi +11 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/shape_base.pyi +8 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/testing.pyi +28 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi +37 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi +21 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi +21 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi +41 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi +5 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi +25 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/mypy.ini +5 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/array_like.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/dtype.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/literal.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/mod.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/modules.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-310.pyc +0 -0
- env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/numeric.cpython-310.pyc +0 -0
env-llmeval/lib/python3.10/site-packages/numpy/core/tests/data/numpy_2_0_array.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:561d36b5dc82ca96bc35be10cdd5619c30225c43b6590adcc1cbce7430c5179c
|
3 |
+
size 718
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (183 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/test_runtime.cpython-310.pyc
ADDED
Binary file (3.66 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/__pycache__/test_typing.cpython-310.pyc
ADDED
Binary file (7.37 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/array_pad.pyi
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import numpy.typing as npt
|
3 |
+
|
4 |
+
AR_i8: npt.NDArray[np.int64]
|
5 |
+
|
6 |
+
np.pad(AR_i8, 2, mode="bob") # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/arrayprint.pyi
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from collections.abc import Callable
|
2 |
+
from typing import Any
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
AR: np.ndarray
|
6 |
+
func1: Callable[[Any], str]
|
7 |
+
func2: Callable[[np.integer[Any]], str]
|
8 |
+
|
9 |
+
np.array2string(AR, style=None) # E: Unexpected keyword argument
|
10 |
+
np.array2string(AR, legacy="1.14") # E: incompatible type
|
11 |
+
np.array2string(AR, sign="*") # E: incompatible type
|
12 |
+
np.array2string(AR, floatmode="default") # E: incompatible type
|
13 |
+
np.array2string(AR, formatter={"A": func1}) # E: incompatible type
|
14 |
+
np.array2string(AR, formatter={"float": func2}) # E: Incompatible types
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/char.pyi
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import numpy.typing as npt
|
3 |
+
|
4 |
+
AR_U: npt.NDArray[np.str_]
|
5 |
+
AR_S: npt.NDArray[np.bytes_]
|
6 |
+
|
7 |
+
np.char.equal(AR_U, AR_S) # E: incompatible type
|
8 |
+
|
9 |
+
np.char.not_equal(AR_U, AR_S) # E: incompatible type
|
10 |
+
|
11 |
+
np.char.greater_equal(AR_U, AR_S) # E: incompatible type
|
12 |
+
|
13 |
+
np.char.less_equal(AR_U, AR_S) # E: incompatible type
|
14 |
+
|
15 |
+
np.char.greater(AR_U, AR_S) # E: incompatible type
|
16 |
+
|
17 |
+
np.char.less(AR_U, AR_S) # E: incompatible type
|
18 |
+
|
19 |
+
np.char.encode(AR_S) # E: incompatible type
|
20 |
+
np.char.decode(AR_U) # E: incompatible type
|
21 |
+
|
22 |
+
np.char.join(AR_U, b"_") # E: incompatible type
|
23 |
+
np.char.join(AR_S, "_") # E: incompatible type
|
24 |
+
|
25 |
+
np.char.ljust(AR_U, 5, fillchar=b"a") # E: incompatible type
|
26 |
+
np.char.ljust(AR_S, 5, fillchar="a") # E: incompatible type
|
27 |
+
np.char.rjust(AR_U, 5, fillchar=b"a") # E: incompatible type
|
28 |
+
np.char.rjust(AR_S, 5, fillchar="a") # E: incompatible type
|
29 |
+
|
30 |
+
np.char.lstrip(AR_U, chars=b"a") # E: incompatible type
|
31 |
+
np.char.lstrip(AR_S, chars="a") # E: incompatible type
|
32 |
+
np.char.strip(AR_U, chars=b"a") # E: incompatible type
|
33 |
+
np.char.strip(AR_S, chars="a") # E: incompatible type
|
34 |
+
np.char.rstrip(AR_U, chars=b"a") # E: incompatible type
|
35 |
+
np.char.rstrip(AR_S, chars="a") # E: incompatible type
|
36 |
+
|
37 |
+
np.char.partition(AR_U, b"a") # E: incompatible type
|
38 |
+
np.char.partition(AR_S, "a") # E: incompatible type
|
39 |
+
np.char.rpartition(AR_U, b"a") # E: incompatible type
|
40 |
+
np.char.rpartition(AR_S, "a") # E: incompatible type
|
41 |
+
|
42 |
+
np.char.replace(AR_U, b"_", b"-") # E: incompatible type
|
43 |
+
np.char.replace(AR_S, "_", "-") # E: incompatible type
|
44 |
+
|
45 |
+
np.char.split(AR_U, b"_") # E: incompatible type
|
46 |
+
np.char.split(AR_S, "_") # E: incompatible type
|
47 |
+
np.char.rsplit(AR_U, b"_") # E: incompatible type
|
48 |
+
np.char.rsplit(AR_S, "_") # E: incompatible type
|
49 |
+
|
50 |
+
np.char.count(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
51 |
+
np.char.count(AR_S, "a", end=9) # E: incompatible type
|
52 |
+
|
53 |
+
np.char.endswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
54 |
+
np.char.endswith(AR_S, "a", end=9) # E: incompatible type
|
55 |
+
np.char.startswith(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
56 |
+
np.char.startswith(AR_S, "a", end=9) # E: incompatible type
|
57 |
+
|
58 |
+
np.char.find(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
59 |
+
np.char.find(AR_S, "a", end=9) # E: incompatible type
|
60 |
+
np.char.rfind(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
61 |
+
np.char.rfind(AR_S, "a", end=9) # E: incompatible type
|
62 |
+
|
63 |
+
np.char.index(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
64 |
+
np.char.index(AR_S, "a", end=9) # E: incompatible type
|
65 |
+
np.char.rindex(AR_U, b"a", start=[1, 2, 3]) # E: incompatible type
|
66 |
+
np.char.rindex(AR_S, "a", end=9) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/chararray.pyi
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
from typing import Any
|
3 |
+
|
4 |
+
AR_U: np.chararray[Any, np.dtype[np.str_]]
|
5 |
+
AR_S: np.chararray[Any, np.dtype[np.bytes_]]
|
6 |
+
|
7 |
+
AR_S.encode() # E: Invalid self argument
|
8 |
+
AR_U.decode() # E: Invalid self argument
|
9 |
+
|
10 |
+
AR_U.join(b"_") # E: incompatible type
|
11 |
+
AR_S.join("_") # E: incompatible type
|
12 |
+
|
13 |
+
AR_U.ljust(5, fillchar=b"a") # E: incompatible type
|
14 |
+
AR_S.ljust(5, fillchar="a") # E: incompatible type
|
15 |
+
AR_U.rjust(5, fillchar=b"a") # E: incompatible type
|
16 |
+
AR_S.rjust(5, fillchar="a") # E: incompatible type
|
17 |
+
|
18 |
+
AR_U.lstrip(chars=b"a") # E: incompatible type
|
19 |
+
AR_S.lstrip(chars="a") # E: incompatible type
|
20 |
+
AR_U.strip(chars=b"a") # E: incompatible type
|
21 |
+
AR_S.strip(chars="a") # E: incompatible type
|
22 |
+
AR_U.rstrip(chars=b"a") # E: incompatible type
|
23 |
+
AR_S.rstrip(chars="a") # E: incompatible type
|
24 |
+
|
25 |
+
AR_U.partition(b"a") # E: incompatible type
|
26 |
+
AR_S.partition("a") # E: incompatible type
|
27 |
+
AR_U.rpartition(b"a") # E: incompatible type
|
28 |
+
AR_S.rpartition("a") # E: incompatible type
|
29 |
+
|
30 |
+
AR_U.replace(b"_", b"-") # E: incompatible type
|
31 |
+
AR_S.replace("_", "-") # E: incompatible type
|
32 |
+
|
33 |
+
AR_U.split(b"_") # E: incompatible type
|
34 |
+
AR_S.split("_") # E: incompatible type
|
35 |
+
AR_S.split(1) # E: incompatible type
|
36 |
+
AR_U.rsplit(b"_") # E: incompatible type
|
37 |
+
AR_S.rsplit("_") # E: incompatible type
|
38 |
+
|
39 |
+
AR_U.count(b"a", start=[1, 2, 3]) # E: incompatible type
|
40 |
+
AR_S.count("a", end=9) # E: incompatible type
|
41 |
+
|
42 |
+
AR_U.endswith(b"a", start=[1, 2, 3]) # E: incompatible type
|
43 |
+
AR_S.endswith("a", end=9) # E: incompatible type
|
44 |
+
AR_U.startswith(b"a", start=[1, 2, 3]) # E: incompatible type
|
45 |
+
AR_S.startswith("a", end=9) # E: incompatible type
|
46 |
+
|
47 |
+
AR_U.find(b"a", start=[1, 2, 3]) # E: incompatible type
|
48 |
+
AR_S.find("a", end=9) # E: incompatible type
|
49 |
+
AR_U.rfind(b"a", start=[1, 2, 3]) # E: incompatible type
|
50 |
+
AR_S.rfind("a", end=9) # E: incompatible type
|
51 |
+
|
52 |
+
AR_U.index(b"a", start=[1, 2, 3]) # E: incompatible type
|
53 |
+
AR_S.index("a", end=9) # E: incompatible type
|
54 |
+
AR_U.rindex(b"a", start=[1, 2, 3]) # E: incompatible type
|
55 |
+
AR_S.rindex("a", end=9) # E: incompatible type
|
56 |
+
|
57 |
+
AR_U == AR_S # E: Unsupported operand types
|
58 |
+
AR_U != AR_S # E: Unsupported operand types
|
59 |
+
AR_U >= AR_S # E: Unsupported operand types
|
60 |
+
AR_U <= AR_S # E: Unsupported operand types
|
61 |
+
AR_U > AR_S # E: Unsupported operand types
|
62 |
+
AR_U < AR_S # E: Unsupported operand types
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/constants.pyi
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
np.Inf = np.Inf # E: Cannot assign to final
|
4 |
+
np.ALLOW_THREADS = np.ALLOW_THREADS # E: Cannot assign to final
|
5 |
+
np.little_endian = np.little_endian # E: Cannot assign to final
|
6 |
+
np.UFUNC_PYVALS_NAME = "bob" # E: Incompatible types
|
7 |
+
np.CLIP = 2 # E: Incompatible types
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/datasource.pyi
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pathlib import Path
|
2 |
+
import numpy as np
|
3 |
+
|
4 |
+
path: Path
|
5 |
+
d1: np.DataSource
|
6 |
+
|
7 |
+
d1.abspath(path) # E: incompatible type
|
8 |
+
d1.abspath(b"...") # E: incompatible type
|
9 |
+
|
10 |
+
d1.exists(path) # E: incompatible type
|
11 |
+
d1.exists(b"...") # E: incompatible type
|
12 |
+
|
13 |
+
d1.open(path, "r") # E: incompatible type
|
14 |
+
d1.open(b"...", encoding="utf8") # E: incompatible type
|
15 |
+
d1.open(None, newline="/n") # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/einsumfunc.pyi
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
import numpy as np
|
3 |
+
|
4 |
+
AR_i: np.ndarray[Any, np.dtype[np.int64]]
|
5 |
+
AR_f: np.ndarray[Any, np.dtype[np.float64]]
|
6 |
+
AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
|
7 |
+
AR_U: np.ndarray[Any, np.dtype[np.str_]]
|
8 |
+
|
9 |
+
np.einsum("i,i->i", AR_i, AR_m) # E: incompatible type
|
10 |
+
np.einsum("i,i->i", AR_f, AR_f, dtype=np.int32) # E: incompatible type
|
11 |
+
np.einsum("i,i->i", AR_i, AR_i, out=AR_U) # E: Value of type variable "_ArrayType" of "einsum" cannot be
|
12 |
+
np.einsum("i,i->i", AR_i, AR_i, out=AR_U, casting="unsafe") # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/false_positives.pyi
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import numpy.typing as npt
|
3 |
+
|
4 |
+
AR_f8: npt.NDArray[np.float64]
|
5 |
+
|
6 |
+
# NOTE: Mypy bug presumably due to the special-casing of heterogeneous tuples;
|
7 |
+
# xref numpy/numpy#20901
|
8 |
+
#
|
9 |
+
# The expected output should be no different than, e.g., when using a
|
10 |
+
# list instead of a tuple
|
11 |
+
np.concatenate(([1], AR_f8)) # E: Argument 1 to "concatenate" has incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/fromnumeric.pyi
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Tests for :mod:`numpy.core.fromnumeric`."""
|
2 |
+
|
3 |
+
import numpy as np
|
4 |
+
import numpy.typing as npt
|
5 |
+
|
6 |
+
A = np.array(True, ndmin=2, dtype=bool)
|
7 |
+
A.setflags(write=False)
|
8 |
+
AR_U: npt.NDArray[np.str_]
|
9 |
+
|
10 |
+
a = np.bool_(True)
|
11 |
+
|
12 |
+
np.take(a, None) # E: No overload variant
|
13 |
+
np.take(a, axis=1.0) # E: No overload variant
|
14 |
+
np.take(A, out=1) # E: No overload variant
|
15 |
+
np.take(A, mode="bob") # E: No overload variant
|
16 |
+
|
17 |
+
np.reshape(a, None) # E: No overload variant
|
18 |
+
np.reshape(A, 1, order="bob") # E: No overload variant
|
19 |
+
|
20 |
+
np.choose(a, None) # E: No overload variant
|
21 |
+
np.choose(a, out=1.0) # E: No overload variant
|
22 |
+
np.choose(A, mode="bob") # E: No overload variant
|
23 |
+
|
24 |
+
np.repeat(a, None) # E: No overload variant
|
25 |
+
np.repeat(A, 1, axis=1.0) # E: No overload variant
|
26 |
+
|
27 |
+
np.swapaxes(A, None, 1) # E: No overload variant
|
28 |
+
np.swapaxes(A, 1, [0]) # E: No overload variant
|
29 |
+
|
30 |
+
np.transpose(A, axes=1.0) # E: No overload variant
|
31 |
+
|
32 |
+
np.partition(a, None) # E: No overload variant
|
33 |
+
np.partition( # E: No overload variant
|
34 |
+
a, 0, axis="bob"
|
35 |
+
)
|
36 |
+
np.partition( # E: No overload variant
|
37 |
+
A, 0, kind="bob"
|
38 |
+
)
|
39 |
+
np.partition(
|
40 |
+
A, 0, order=range(5) # E: Argument "order" to "partition" has incompatible type
|
41 |
+
)
|
42 |
+
|
43 |
+
np.argpartition(
|
44 |
+
a, None # E: incompatible type
|
45 |
+
)
|
46 |
+
np.argpartition(
|
47 |
+
a, 0, axis="bob" # E: incompatible type
|
48 |
+
)
|
49 |
+
np.argpartition(
|
50 |
+
A, 0, kind="bob" # E: incompatible type
|
51 |
+
)
|
52 |
+
np.argpartition(
|
53 |
+
A, 0, order=range(5) # E: Argument "order" to "argpartition" has incompatible type
|
54 |
+
)
|
55 |
+
|
56 |
+
np.sort(A, axis="bob") # E: No overload variant
|
57 |
+
np.sort(A, kind="bob") # E: No overload variant
|
58 |
+
np.sort(A, order=range(5)) # E: Argument "order" to "sort" has incompatible type
|
59 |
+
|
60 |
+
np.argsort(A, axis="bob") # E: Argument "axis" to "argsort" has incompatible type
|
61 |
+
np.argsort(A, kind="bob") # E: Argument "kind" to "argsort" has incompatible type
|
62 |
+
np.argsort(A, order=range(5)) # E: Argument "order" to "argsort" has incompatible type
|
63 |
+
|
64 |
+
np.argmax(A, axis="bob") # E: No overload variant of "argmax" matches argument type
|
65 |
+
np.argmax(A, kind="bob") # E: No overload variant of "argmax" matches argument type
|
66 |
+
|
67 |
+
np.argmin(A, axis="bob") # E: No overload variant of "argmin" matches argument type
|
68 |
+
np.argmin(A, kind="bob") # E: No overload variant of "argmin" matches argument type
|
69 |
+
|
70 |
+
np.searchsorted( # E: No overload variant of "searchsorted" matches argument type
|
71 |
+
A[0], 0, side="bob"
|
72 |
+
)
|
73 |
+
np.searchsorted( # E: No overload variant of "searchsorted" matches argument type
|
74 |
+
A[0], 0, sorter=1.0
|
75 |
+
)
|
76 |
+
|
77 |
+
np.resize(A, 1.0) # E: No overload variant
|
78 |
+
|
79 |
+
np.squeeze(A, 1.0) # E: No overload variant of "squeeze" matches argument type
|
80 |
+
|
81 |
+
np.diagonal(A, offset=None) # E: No overload variant
|
82 |
+
np.diagonal(A, axis1="bob") # E: No overload variant
|
83 |
+
np.diagonal(A, axis2=[]) # E: No overload variant
|
84 |
+
|
85 |
+
np.trace(A, offset=None) # E: No overload variant
|
86 |
+
np.trace(A, axis1="bob") # E: No overload variant
|
87 |
+
np.trace(A, axis2=[]) # E: No overload variant
|
88 |
+
|
89 |
+
np.ravel(a, order="bob") # E: No overload variant
|
90 |
+
|
91 |
+
np.compress( # E: No overload variant
|
92 |
+
[True], A, axis=1.0
|
93 |
+
)
|
94 |
+
|
95 |
+
np.clip(a, 1, 2, out=1) # E: No overload variant of "clip" matches argument type
|
96 |
+
|
97 |
+
np.sum(a, axis=1.0) # E: No overload variant
|
98 |
+
np.sum(a, keepdims=1.0) # E: No overload variant
|
99 |
+
np.sum(a, initial=[1]) # E: No overload variant
|
100 |
+
|
101 |
+
np.all(a, axis=1.0) # E: No overload variant
|
102 |
+
np.all(a, keepdims=1.0) # E: No overload variant
|
103 |
+
np.all(a, out=1.0) # E: No overload variant
|
104 |
+
|
105 |
+
np.any(a, axis=1.0) # E: No overload variant
|
106 |
+
np.any(a, keepdims=1.0) # E: No overload variant
|
107 |
+
np.any(a, out=1.0) # E: No overload variant
|
108 |
+
|
109 |
+
np.cumsum(a, axis=1.0) # E: No overload variant
|
110 |
+
np.cumsum(a, dtype=1.0) # E: No overload variant
|
111 |
+
np.cumsum(a, out=1.0) # E: No overload variant
|
112 |
+
|
113 |
+
np.ptp(a, axis=1.0) # E: No overload variant
|
114 |
+
np.ptp(a, keepdims=1.0) # E: No overload variant
|
115 |
+
np.ptp(a, out=1.0) # E: No overload variant
|
116 |
+
|
117 |
+
np.amax(a, axis=1.0) # E: No overload variant
|
118 |
+
np.amax(a, keepdims=1.0) # E: No overload variant
|
119 |
+
np.amax(a, out=1.0) # E: No overload variant
|
120 |
+
np.amax(a, initial=[1.0]) # E: No overload variant
|
121 |
+
np.amax(a, where=[1.0]) # E: incompatible type
|
122 |
+
|
123 |
+
np.amin(a, axis=1.0) # E: No overload variant
|
124 |
+
np.amin(a, keepdims=1.0) # E: No overload variant
|
125 |
+
np.amin(a, out=1.0) # E: No overload variant
|
126 |
+
np.amin(a, initial=[1.0]) # E: No overload variant
|
127 |
+
np.amin(a, where=[1.0]) # E: incompatible type
|
128 |
+
|
129 |
+
np.prod(a, axis=1.0) # E: No overload variant
|
130 |
+
np.prod(a, out=False) # E: No overload variant
|
131 |
+
np.prod(a, keepdims=1.0) # E: No overload variant
|
132 |
+
np.prod(a, initial=int) # E: No overload variant
|
133 |
+
np.prod(a, where=1.0) # E: No overload variant
|
134 |
+
np.prod(AR_U) # E: incompatible type
|
135 |
+
|
136 |
+
np.cumprod(a, axis=1.0) # E: No overload variant
|
137 |
+
np.cumprod(a, out=False) # E: No overload variant
|
138 |
+
np.cumprod(AR_U) # E: incompatible type
|
139 |
+
|
140 |
+
np.size(a, axis=1.0) # E: Argument "axis" to "size" has incompatible type
|
141 |
+
|
142 |
+
np.around(a, decimals=1.0) # E: No overload variant
|
143 |
+
np.around(a, out=type) # E: No overload variant
|
144 |
+
np.around(AR_U) # E: incompatible type
|
145 |
+
|
146 |
+
np.mean(a, axis=1.0) # E: No overload variant
|
147 |
+
np.mean(a, out=False) # E: No overload variant
|
148 |
+
np.mean(a, keepdims=1.0) # E: No overload variant
|
149 |
+
np.mean(AR_U) # E: incompatible type
|
150 |
+
|
151 |
+
np.std(a, axis=1.0) # E: No overload variant
|
152 |
+
np.std(a, out=False) # E: No overload variant
|
153 |
+
np.std(a, ddof='test') # E: No overload variant
|
154 |
+
np.std(a, keepdims=1.0) # E: No overload variant
|
155 |
+
np.std(AR_U) # E: incompatible type
|
156 |
+
|
157 |
+
np.var(a, axis=1.0) # E: No overload variant
|
158 |
+
np.var(a, out=False) # E: No overload variant
|
159 |
+
np.var(a, ddof='test') # E: No overload variant
|
160 |
+
np.var(a, keepdims=1.0) # E: No overload variant
|
161 |
+
np.var(AR_U) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/index_tricks.pyi
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
AR_LIKE_i: list[int]
|
4 |
+
AR_LIKE_f: list[float]
|
5 |
+
|
6 |
+
np.ndindex([1, 2, 3]) # E: No overload variant
|
7 |
+
np.unravel_index(AR_LIKE_f, (1, 2, 3)) # E: incompatible type
|
8 |
+
np.ravel_multi_index(AR_LIKE_i, (1, 2, 3), mode="bob") # E: No overload variant
|
9 |
+
np.mgrid[1] # E: Invalid index type
|
10 |
+
np.mgrid[...] # E: Invalid index type
|
11 |
+
np.ogrid[1] # E: Invalid index type
|
12 |
+
np.ogrid[...] # E: Invalid index type
|
13 |
+
np.fill_diagonal(AR_LIKE_f, 2) # E: incompatible type
|
14 |
+
np.diag_indices(1.0) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/lib_utils.pyi
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
np.deprecate(1) # E: No overload variant
|
4 |
+
|
5 |
+
np.deprecate_with_doc(1) # E: incompatible type
|
6 |
+
|
7 |
+
np.byte_bounds(1) # E: incompatible type
|
8 |
+
|
9 |
+
np.who(1) # E: incompatible type
|
10 |
+
|
11 |
+
np.lookfor(None) # E: incompatible type
|
12 |
+
|
13 |
+
np.safe_eval(None) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/memmap.pyi
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
with open("file.txt", "r") as f:
|
4 |
+
np.memmap(f) # E: No overload variant
|
5 |
+
np.memmap("test.txt", shape=[10, 5]) # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ndarray.pyi
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
# Ban setting dtype since mutating the type of the array in place
|
4 |
+
# makes having ndarray be generic over dtype impossible. Generally
|
5 |
+
# users should use `ndarray.view` in this situation anyway. See
|
6 |
+
#
|
7 |
+
# https://github.com/numpy/numpy-stubs/issues/7
|
8 |
+
#
|
9 |
+
# for more context.
|
10 |
+
float_array = np.array([1.0])
|
11 |
+
float_array.dtype = np.bool_ # E: Property "dtype" defined in "ndarray" is read-only
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/nested_sequence.pyi
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from collections.abc import Sequence
|
2 |
+
from numpy._typing import _NestedSequence
|
3 |
+
|
4 |
+
a: Sequence[float]
|
5 |
+
b: list[complex]
|
6 |
+
c: tuple[str, ...]
|
7 |
+
d: int
|
8 |
+
e: str
|
9 |
+
|
10 |
+
def func(a: _NestedSequence[int]) -> None:
|
11 |
+
...
|
12 |
+
|
13 |
+
reveal_type(func(a)) # E: incompatible type
|
14 |
+
reveal_type(func(b)) # E: incompatible type
|
15 |
+
reveal_type(func(c)) # E: incompatible type
|
16 |
+
reveal_type(func(d)) # E: incompatible type
|
17 |
+
reveal_type(func(e)) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/numerictypes.pyi
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
# Technically this works, but probably shouldn't. See
|
4 |
+
#
|
5 |
+
# https://github.com/numpy/numpy/issues/16366
|
6 |
+
#
|
7 |
+
np.maximum_sctype(1) # E: No overload variant
|
8 |
+
|
9 |
+
np.issubsctype(1, np.int64) # E: incompatible type
|
10 |
+
|
11 |
+
np.issubdtype(1, np.int64) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/shape_base.pyi
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
class DTypeLike:
|
4 |
+
dtype: np.dtype[np.int_]
|
5 |
+
|
6 |
+
dtype_like: DTypeLike
|
7 |
+
|
8 |
+
np.expand_dims(dtype_like, (5, 10)) # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/testing.pyi
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import numpy.typing as npt
|
3 |
+
|
4 |
+
AR_U: npt.NDArray[np.str_]
|
5 |
+
|
6 |
+
def func() -> bool: ...
|
7 |
+
|
8 |
+
np.testing.assert_(True, msg=1) # E: incompatible type
|
9 |
+
np.testing.build_err_msg(1, "test") # E: incompatible type
|
10 |
+
np.testing.assert_almost_equal(AR_U, AR_U) # E: incompatible type
|
11 |
+
np.testing.assert_approx_equal([1, 2, 3], [1, 2, 3]) # E: incompatible type
|
12 |
+
np.testing.assert_array_almost_equal(AR_U, AR_U) # E: incompatible type
|
13 |
+
np.testing.assert_array_less(AR_U, AR_U) # E: incompatible type
|
14 |
+
np.testing.assert_string_equal(b"a", b"a") # E: incompatible type
|
15 |
+
|
16 |
+
np.testing.assert_raises(expected_exception=TypeError, callable=func) # E: No overload variant
|
17 |
+
np.testing.assert_raises_regex(expected_exception=TypeError, expected_regex="T", callable=func) # E: No overload variant
|
18 |
+
|
19 |
+
np.testing.assert_allclose(AR_U, AR_U) # E: incompatible type
|
20 |
+
np.testing.assert_array_almost_equal_nulp(AR_U, AR_U) # E: incompatible type
|
21 |
+
np.testing.assert_array_max_ulp(AR_U, AR_U) # E: incompatible type
|
22 |
+
|
23 |
+
np.testing.assert_warns(warning_class=RuntimeWarning, func=func) # E: No overload variant
|
24 |
+
np.testing.assert_no_warnings(func=func) # E: No overload variant
|
25 |
+
np.testing.assert_no_warnings(func, None) # E: Too many arguments
|
26 |
+
np.testing.assert_no_warnings(func, test=None) # E: Unexpected keyword argument
|
27 |
+
|
28 |
+
np.testing.assert_no_gc_cycles(func=func) # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/twodim_base.pyi
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any, TypeVar
|
2 |
+
|
3 |
+
import numpy as np
|
4 |
+
import numpy.typing as npt
|
5 |
+
|
6 |
+
|
7 |
+
def func1(ar: npt.NDArray[Any], a: int) -> npt.NDArray[np.str_]:
|
8 |
+
pass
|
9 |
+
|
10 |
+
|
11 |
+
def func2(ar: npt.NDArray[Any], a: float) -> float:
|
12 |
+
pass
|
13 |
+
|
14 |
+
|
15 |
+
AR_b: npt.NDArray[np.bool_]
|
16 |
+
AR_m: npt.NDArray[np.timedelta64]
|
17 |
+
|
18 |
+
AR_LIKE_b: list[bool]
|
19 |
+
|
20 |
+
np.eye(10, M=20.0) # E: No overload variant
|
21 |
+
np.eye(10, k=2.5, dtype=int) # E: No overload variant
|
22 |
+
|
23 |
+
np.diag(AR_b, k=0.5) # E: No overload variant
|
24 |
+
np.diagflat(AR_b, k=0.5) # E: No overload variant
|
25 |
+
|
26 |
+
np.tri(10, M=20.0) # E: No overload variant
|
27 |
+
np.tri(10, k=2.5, dtype=int) # E: No overload variant
|
28 |
+
|
29 |
+
np.tril(AR_b, k=0.5) # E: No overload variant
|
30 |
+
np.triu(AR_b, k=0.5) # E: No overload variant
|
31 |
+
|
32 |
+
np.vander(AR_m) # E: incompatible type
|
33 |
+
|
34 |
+
np.histogram2d(AR_m) # E: No overload variant
|
35 |
+
|
36 |
+
np.mask_indices(10, func1) # E: incompatible type
|
37 |
+
np.mask_indices(10, func2, 10.5) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufunc_config.pyi
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Typing tests for `numpy.core._ufunc_config`."""
|
2 |
+
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
def func1(a: str, b: int, c: float) -> None: ...
|
6 |
+
def func2(a: str, *, b: int) -> None: ...
|
7 |
+
|
8 |
+
class Write1:
|
9 |
+
def write1(self, a: str) -> None: ...
|
10 |
+
|
11 |
+
class Write2:
|
12 |
+
def write(self, a: str, b: str) -> None: ...
|
13 |
+
|
14 |
+
class Write3:
|
15 |
+
def write(self, *, a: str) -> None: ...
|
16 |
+
|
17 |
+
np.seterrcall(func1) # E: Argument 1 to "seterrcall" has incompatible type
|
18 |
+
np.seterrcall(func2) # E: Argument 1 to "seterrcall" has incompatible type
|
19 |
+
np.seterrcall(Write1()) # E: Argument 1 to "seterrcall" has incompatible type
|
20 |
+
np.seterrcall(Write2()) # E: Argument 1 to "seterrcall" has incompatible type
|
21 |
+
np.seterrcall(Write3()) # E: Argument 1 to "seterrcall" has incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufunclike.pyi
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Any
|
2 |
+
import numpy as np
|
3 |
+
|
4 |
+
AR_c: np.ndarray[Any, np.dtype[np.complex128]]
|
5 |
+
AR_m: np.ndarray[Any, np.dtype[np.timedelta64]]
|
6 |
+
AR_M: np.ndarray[Any, np.dtype[np.datetime64]]
|
7 |
+
AR_O: np.ndarray[Any, np.dtype[np.object_]]
|
8 |
+
|
9 |
+
np.fix(AR_c) # E: incompatible type
|
10 |
+
np.fix(AR_m) # E: incompatible type
|
11 |
+
np.fix(AR_M) # E: incompatible type
|
12 |
+
|
13 |
+
np.isposinf(AR_c) # E: incompatible type
|
14 |
+
np.isposinf(AR_m) # E: incompatible type
|
15 |
+
np.isposinf(AR_M) # E: incompatible type
|
16 |
+
np.isposinf(AR_O) # E: incompatible type
|
17 |
+
|
18 |
+
np.isneginf(AR_c) # E: incompatible type
|
19 |
+
np.isneginf(AR_m) # E: incompatible type
|
20 |
+
np.isneginf(AR_M) # E: incompatible type
|
21 |
+
np.isneginf(AR_O) # E: incompatible type
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/ufuncs.pyi
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
import numpy.typing as npt
|
3 |
+
|
4 |
+
AR_f8: npt.NDArray[np.float64]
|
5 |
+
|
6 |
+
np.sin.nin + "foo" # E: Unsupported operand types
|
7 |
+
np.sin(1, foo="bar") # E: No overload variant
|
8 |
+
|
9 |
+
np.abs(None) # E: No overload variant
|
10 |
+
|
11 |
+
np.add(1, 1, 1) # E: No overload variant
|
12 |
+
np.add(1, 1, axis=0) # E: No overload variant
|
13 |
+
|
14 |
+
np.matmul(AR_f8, AR_f8, where=True) # E: No overload variant
|
15 |
+
|
16 |
+
np.frexp(AR_f8, out=None) # E: No overload variant
|
17 |
+
np.frexp(AR_f8, out=AR_f8) # E: No overload variant
|
18 |
+
|
19 |
+
np.absolute.outer() # E: "None" not callable
|
20 |
+
np.frexp.outer() # E: "None" not callable
|
21 |
+
np.divmod.outer() # E: "None" not callable
|
22 |
+
np.matmul.outer() # E: "None" not callable
|
23 |
+
|
24 |
+
np.absolute.reduceat() # E: "None" not callable
|
25 |
+
np.frexp.reduceat() # E: "None" not callable
|
26 |
+
np.divmod.reduceat() # E: "None" not callable
|
27 |
+
np.matmul.reduceat() # E: "None" not callable
|
28 |
+
|
29 |
+
np.absolute.reduce() # E: "None" not callable
|
30 |
+
np.frexp.reduce() # E: "None" not callable
|
31 |
+
np.divmod.reduce() # E: "None" not callable
|
32 |
+
np.matmul.reduce() # E: "None" not callable
|
33 |
+
|
34 |
+
np.absolute.accumulate() # E: "None" not callable
|
35 |
+
np.frexp.accumulate() # E: "None" not callable
|
36 |
+
np.divmod.accumulate() # E: "None" not callable
|
37 |
+
np.matmul.accumulate() # E: "None" not callable
|
38 |
+
|
39 |
+
np.frexp.at() # E: "None" not callable
|
40 |
+
np.divmod.at() # E: "None" not callable
|
41 |
+
np.matmul.at() # E: "None" not callable
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/fail/warnings_and_errors.pyi
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import numpy as np
|
2 |
+
|
3 |
+
np.AxisError(1.0) # E: No overload variant
|
4 |
+
np.AxisError(1, ndim=2.0) # E: No overload variant
|
5 |
+
np.AxisError(2, msg_prefix=404) # E: No overload variant
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/misc/extended_precision.pyi
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
|
3 |
+
import numpy as np
|
4 |
+
from numpy._typing import _80Bit, _96Bit, _128Bit, _256Bit
|
5 |
+
|
6 |
+
if sys.version_info >= (3, 11):
|
7 |
+
from typing import assert_type
|
8 |
+
else:
|
9 |
+
from typing_extensions import assert_type
|
10 |
+
|
11 |
+
assert_type(np.uint128(), np.unsignedinteger[_128Bit])
|
12 |
+
assert_type(np.uint256(), np.unsignedinteger[_256Bit])
|
13 |
+
|
14 |
+
assert_type(np.int128(), np.signedinteger[_128Bit])
|
15 |
+
assert_type(np.int256(), np.signedinteger[_256Bit])
|
16 |
+
|
17 |
+
assert_type(np.float80(), np.floating[_80Bit])
|
18 |
+
assert_type(np.float96(), np.floating[_96Bit])
|
19 |
+
assert_type(np.float128(), np.floating[_128Bit])
|
20 |
+
assert_type(np.float256(), np.floating[_256Bit])
|
21 |
+
|
22 |
+
assert_type(np.complex160(), np.complexfloating[_80Bit, _80Bit])
|
23 |
+
assert_type(np.complex192(), np.complexfloating[_96Bit, _96Bit])
|
24 |
+
assert_type(np.complex256(), np.complexfloating[_128Bit, _128Bit])
|
25 |
+
assert_type(np.complex512(), np.complexfloating[_256Bit, _256Bit])
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/mypy.ini
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[mypy]
|
2 |
+
plugins = numpy.typing.mypy_plugin
|
3 |
+
show_absolute_path = True
|
4 |
+
implicit_reexport = False
|
5 |
+
pretty = True
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arithmetic.cpython-310.pyc
ADDED
Binary file (7.21 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/array_constructors.cpython-310.pyc
ADDED
Binary file (2.94 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/array_like.cpython-310.pyc
ADDED
Binary file (1.55 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayprint.cpython-310.pyc
ADDED
Binary file (926 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/arrayterator.cpython-310.pyc
ADDED
Binary file (663 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/bitwise_ops.cpython-310.pyc
ADDED
Binary file (1.42 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/comparisons.cpython-310.pyc
ADDED
Binary file (3.62 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/dtype.cpython-310.pyc
ADDED
Binary file (1.17 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/einsumfunc.cpython-310.pyc
ADDED
Binary file (1.22 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/flatiter.cpython-310.pyc
ADDED
Binary file (472 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/fromnumeric.cpython-310.pyc
ADDED
Binary file (3.74 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/index_tricks.cpython-310.pyc
ADDED
Binary file (1.62 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_utils.cpython-310.pyc
ADDED
Binary file (754 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/lib_version.cpython-310.pyc
ADDED
Binary file (443 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/literal.cpython-310.pyc
ADDED
Binary file (1.31 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/mod.cpython-310.pyc
ADDED
Binary file (1.75 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/modules.cpython-310.pyc
ADDED
Binary file (797 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/multiarray.cpython-310.pyc
ADDED
Binary file (1.47 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_conversion.cpython-310.pyc
ADDED
Binary file (1.47 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_misc.cpython-310.pyc
ADDED
Binary file (3.1 kB). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/ndarray_shape_manipulation.cpython-310.pyc
ADDED
Binary file (767 Bytes). View file
|
|
env-llmeval/lib/python3.10/site-packages/numpy/typing/tests/data/pass/__pycache__/numeric.cpython-310.pyc
ADDED
Binary file (1.86 kB). View file
|
|