From 242a0642d92212a3eccfe7f783c3a65fc2840f38 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Tue, 23 Feb 2021 19:37:14 -0800 Subject: [PATCH] MAINT: remove nonsensical comparison of pointer < 0 --- numpy/core/src/multiarray/ctors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index ef105ff2d3f8..08c285708fe1 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -552,7 +552,7 @@ PyArray_AssignFromCache_Recursive( else { PyArrayObject *view; view = (PyArrayObject *)array_item_asarray(self, i); - if (view < 0) { + if (view == NULL) { goto fail; } if (PyArray_AssignFromCache_Recursive(view, ndim, cache) < 0) {