2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 04:22:16 +00:00

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."

This commit is contained in:
Mark Borgerding
2017-09-20 16:47:48 -04:00
committed by Stefan Seefeld
parent ecf05c4a90
commit 135c025484

View File

@@ -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();