diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-01-15 21:32:56 -0600 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-01-15 21:32:56 -0600 |
commit | 9e892cc22e28da9439c90e291ec2c67da810df65 (patch) | |
tree | 3e59fdd4223c5ec9f3b6a78227be061c9533a286 /numpy | |
parent | feb0794bdb6709861b395818ddf0ea3548310e24 (diff) | |
download | numpy-9e892cc22e28da9439c90e291ec2c67da810df65.tar.gz |
DEP: Deprecate `->f->fastclip` at registration time
This adds the additional deprecation of fastclip if it is set at
registration time instead of only testing that it is never used.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/usertypes.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/usertypes.c b/numpy/core/src/multiarray/usertypes.c index 9ab3a2a5e..997467b4d 100644 --- a/numpy/core/src/multiarray/usertypes.c +++ b/numpy/core/src/multiarray/usertypes.c @@ -151,6 +151,18 @@ test_deprecated_arrfuncs_members(PyArray_ArrFuncs *f) { return -1; } } + /* NumPy 1.19, 2020-01-15 */ + if (f->fastclip != NULL) { + /* fastclip was already deprecated at execution time in 1.17. */ + if (DEPRECATE( + "The ->f->fastclip member of custom dtypes is deprecated; " + "setting it will be an error in the future.\n" + "The custom dtype you are using must be changed to use " + "PyUFunc_RegisterLoopForDescr to attach a custom loop to " + "np.core.umath.clip, np.minimum, and np.maximum") < 0) { + return -1; + } + } return 0; } |