From ff44f113101814b6321906a312fe9f0db1b2f1e6 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Tue, 15 Sep 2020 14:35:14 +0100 Subject: BUG: Set deprecated fields to null in PyArray_InitArrFuncs Initializing the deprecated fields to null ensures that if a user sets them to their own function pointers, this can be detected and the warning about using deprecated fields can be printed. --- numpy/core/src/multiarray/usertypes.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/numpy/core/src/multiarray/usertypes.c b/numpy/core/src/multiarray/usertypes.c index 6b6c6bd9d..d75fd3130 100644 --- a/numpy/core/src/multiarray/usertypes.c +++ b/numpy/core/src/multiarray/usertypes.c @@ -127,6 +127,9 @@ PyArray_InitArrFuncs(PyArray_ArrFuncs *f) f->scalarkind = NULL; f->cancastscalarkindto = NULL; f->cancastto = NULL; + f->fastclip = NULL; + f->fastputmask = NULL; + f->fasttake = NULL; } -- cgit v1.2.1