Upload hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi with huggingface_hub
Browse files
hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/reveal/numerictypes.pyi
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Literal, assert_type
|
| 2 |
+
|
| 3 |
+
import numpy as np
|
| 4 |
+
|
| 5 |
+
assert_type(np.ScalarType[0], type[int])
|
| 6 |
+
assert_type(np.ScalarType[3], type[bool])
|
| 7 |
+
assert_type(np.ScalarType[8], type[np.complex64])
|
| 8 |
+
assert_type(np.ScalarType[9], type[np.complex128])
|
| 9 |
+
assert_type(np.ScalarType[-1], type[np.void])
|
| 10 |
+
assert_type(np.bool_(object()), np.bool)
|
| 11 |
+
|
| 12 |
+
assert_type(np.typecodes["Character"], Literal["c"])
|
| 13 |
+
assert_type(np.typecodes["Complex"], Literal["FDG"])
|
| 14 |
+
assert_type(np.typecodes["All"], Literal["?bhilqnpBHILQNPefdgFDGSUVOMm"])
|
| 15 |
+
|
| 16 |
+
assert_type(np.sctypeDict["uint8"], type[np.generic])
|