From 84d30d4e985465ad995b39660c55d414c57af20f Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Tue, 15 Sep 2020 14:35:14 +0100 Subject: [PATCH] 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 997467b4d677..f9c3c057c07b 100644 --- a/numpy/core/src/multiarray/usertypes.c +++ b/numpy/core/src/multiarray/usertypes.c @@ -126,6 +126,9 @@ PyArray_InitArrFuncs(PyArray_ArrFuncs *f) f->scalarkind = NULL; f->cancastscalarkindto = NULL; f->cancastto = NULL; + f->fastclip = NULL; + f->fastputmask = NULL; + f->fasttake = NULL; }