Upload hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi with huggingface_hub
Browse files
hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/fail/bitwise_ops.pyi
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
|
| 3 |
+
i8 = np.int64()
|
| 4 |
+
i4 = np.int32()
|
| 5 |
+
u8 = np.uint64()
|
| 6 |
+
b_ = np.bool()
|
| 7 |
+
i = 0
|
| 8 |
+
|
| 9 |
+
f8 = np.float64()
|
| 10 |
+
|
| 11 |
+
b_ >> f8 # type: ignore[operator]
|
| 12 |
+
i8 << f8 # type: ignore[operator]
|
| 13 |
+
i | f8 # type: ignore[operator]
|
| 14 |
+
i8 ^ f8 # type: ignore[operator]
|
| 15 |
+
u8 & f8 # type: ignore[operator]
|
| 16 |
+
~f8 # type: ignore[operator]
|
| 17 |
+
# TODO: Certain mixes like i4 << u8 go to float and thus should fail
|