8000 ENH: add type stubs from numpy-stubs by person142 · Pull Request #16515 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: add type stubs from numpy-stubs #16515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 9, 2020
Prev Previous commit
MAINT: avoid more division by zero in typing test causing aarch64 to …
…fail
  • Loading branch information
person142 committed Jun 8, 2020
commit 2e238e411a4875d470a40cd0c351056ca30882ed
11 changes: 6 additions & 5 deletions numpy/tests/typing/pass/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Iterable # noqa: F401

# Basic checks
array = np.array([2, 3])
array = np.array([1, 2])


def ndarray_func(x):
Expand Down Expand Up @@ -125,21 +125,22 @@ def iterable_func(x):
1 * array
array *= 1

nonzero_array = np.array([1, 2])
array / 1
1 / array
1 / nonzero_array
float_array = np.array([1.0, 2.0])
float_array /= 1

array // 1
1 // array
1 // nonzero_array
array //= 1

array % 1
1 % array
1 % nonzero_array
array %= 1

divmod(array, 1)
divmod(1, array)
divmod(1, nonzero_array)

array ** 1
1 ** array
Expand Down
0