diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-04-01 18:09:28 -0500 |
|---|---|---|
| committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-04-08 12:25:10 -0500 |
| commit | 5e310e94de468359332ea5366d6555df5bc85231 (patch) | |
| tree | 36a18b62c521896a0253a47864fcd47cb46106f9 /numpy/typing | |
| parent | 0fe69ae3fc513aefd32a58ae8ccac294b12300d2 (diff) | |
| download | numpy-5e310e94de468359332ea5366d6555df5bc85231.tar.gz | |
API,DEP: Move ufunc signature parsing to the start
This may have slight affects on users, see release notes.
Mainly, we have to parse the type tuple up-front (because we need
to replace the current type resolution). Since we _must_ de-facto
replace the current type resolution, I do not see why we should
duplicate code for the odd possibility of someone actually calling
`ufunc.type_resolver()` with a `typetup` that is not a actually a
type tuple.
This commit also deprecates `signature="l"` as meaning (normally)
the same as `dtype="l"`.
Diffstat (limited to 'numpy/typing')
| -rw-r--r-- | numpy/typing/tests/data/pass/ufuncs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/typing/tests/data/pass/ufuncs.py b/numpy/typing/tests/data/pass/ufuncs.py index ad4d483d4..3c93fb2cf 100644 --- a/numpy/typing/tests/data/pass/ufuncs.py +++ b/numpy/typing/tests/data/pass/ufuncs.py @@ -4,7 +4,7 @@ np.sin(1) np.sin([1, 2, 3]) np.sin(1, out=np.empty(1)) np.matmul(np.ones((2, 2, 2)), np.ones((2, 2, 2)), axes=[(0, 1), (0, 1), (0, 1)]) -np.sin(1, signature="D") +np.sin(1, signature="D->D") np.sin(1, extobj=[16, 1, lambda: None]) # NOTE: `np.generic` subclasses are not guaranteed to support addition; # re-enable this we can infer the exact return type of `np.sin(...)`. |
