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:
committed by
Stefan Seefeld
parent
ecf05c4a90
commit
135c025484
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user