From 135c02548431e86d4b169fae07e9f1ceee188211 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Wed, 20 Sep 2017 16:47:48 -0400 Subject: [PATCH] fixed nuisance warning when calling from_data(...,bob) with an ndarray bob, "FutureWarning: comparison to None will result in an elementwise object comparison in the future." --- src/numpy/ndarray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/numpy/ndarray.cpp b/src/numpy/ndarray.cpp index 625c43b3..af09ecc3 100644 --- a/src/numpy/ndarray.cpp +++ b/src/numpy/ndarray.cpp @@ -194,7 +194,7 @@ python::object ndarray::get_base() const void ndarray::set_base(object const & base) { Py_XDECREF(get_struct()->base); - if (base != object()) + if (base.ptr()) { Py_INCREF(base.ptr()); get_struct()->base = base.ptr();