diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2020-06-23 07:10:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 22:10:21 -0700 |
commit | dda8c852e7e968730c8fbccbf46b9121694194f1 (patch) | |
tree | a3b50f6d9ce7036216935b4488700f3a7acf6139 /numpy/tests/typing/pass/fromnumeric.py | |
parent | 28895456f147bc6e78f9366b75d1897bbc7ac3fa (diff) | |
download | numpy-dda8c852e7e968730c8fbccbf46b9121694194f1.tar.gz |
ENH: Added annotations to 8 functions from np.core.fromnumeric (#16647)
Newly annotated functions:
* `clip`
* `sum`
* `all`
* `any`
* `cumsum`
* `ptp`
* `amax`
* `amin`
Diffstat (limited to 'numpy/tests/typing/pass/fromnumeric.py')
-rw-r--r-- | numpy/tests/typing/pass/fromnumeric.py | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/numpy/tests/typing/pass/fromnumeric.py b/numpy/tests/typing/pass/fromnumeric.py index 0ce8ef970..d9dd45c54 100644 --- a/numpy/tests/typing/pass/fromnumeric.py +++ b/numpy/tests/typing/pass/fromnumeric.py @@ -114,3 +114,72 @@ np.compress([True], b) np.compress([True], c) np.compress([True], A) np.compress([True], B) + +np.clip(a, 0, 1.0) +np.clip(b, -1, 1) +np.clip(a, 0, None) +np.clip(b, None, 1) +np.clip(c, 0, 1) +np.clip(A, 0, 1) +np.clip(B, 0, 1) +np.clip(B, [0, 1], [1, 2]) + +np.sum(a) +np.sum(b) +np.sum(c) +np.sum(A) +np.sum(B) +np.sum(A, axis=0) +np.sum(B, axis=0) + +np.all(a) +np.all(b) +np.all(c) +np.all(A) +np.all(B) +np.all(A, axis=0) +np.all(B, axis=0) +np.all(A, keepdims=True) +np.all(B, keepdims=True) + +np.any(a) +np.any(b) +np.any(c) +np.any(A) +np.any(B) +np.any(A, axis=0) +np.any(B, axis=0) +np.any(A, keepdims=True) +np.any(B, keepdims=True) + +np.cumsum(a) +np.cumsum(b) +np.cumsum(c) +np.cumsum(A) +np.cumsum(B) + +np.ptp(b) +np.ptp(c) +np.ptp(B) +np.ptp(B, axis=0) +np.ptp(B, keepdims=True) + +np.amax(a) +np.amax(b) +np.amax(c) +np.amax(A) +np.amax(B) +np.amax(A, axis=0) +np.amax(B, axis=0) +np.amax(A, keepdims=True) +np.amax(B, keepdims=True) + +np.amin(a) +np.amin(b) +np.amin(c) +np.amin(A) +np.amin(B) +np.amin(A, axis=0) +np.amin(B, axis=0) +np.amin(A, keepdims=True) +np.amin(B, keepdims=True) |