Upload hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/pass/ufuncs.py with huggingface_hub
Browse files
hf_env/lib/python3.14/site-packages/numpy/typing/tests/data/pass/ufuncs.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import numpy as np
|
| 2 |
+
|
| 3 |
+
np.sin(1)
|
| 4 |
+
np.sin([1, 2, 3])
|
| 5 |
+
np.sin(1, out=np.empty(1))
|
| 6 |
+
np.matmul(np.ones((2, 2, 2)), np.ones((2, 2, 2)), axes=[(0, 1), (0, 1), (0, 1)])
|
| 7 |
+
np.sin(1, signature="D->D")
|
| 8 |
+
# NOTE: `np.generic` subclasses are not guaranteed to support addition;
|
| 9 |
+
# re-enable this we can infer the exact return type of `np.sin(...)`.
|
| 10 |
+
#
|
| 11 |
+
# np.sin(1) + np.sin(1)
|
| 12 |
+
np.sin.types[0]
|
| 13 |
+
np.sin.__name__
|
| 14 |
+
np.sin.__doc__
|
| 15 |
+
|
| 16 |
+
np.abs(np.array([1]))
|