Skip to content

Commit 135c025

Browse files
mborgerdingstefanseefeld
authored andcommitted
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."
1 parent ecf05c4 commit 135c025

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/numpy/ndarray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ python::object ndarray::get_base() const
194194
void ndarray::set_base(object const & base)
195195
{
196196
Py_XDECREF(get_struct()->base);
197-
if (base != object())
197+
if (base.ptr())
198198
{
199199
Py_INCREF(base.ptr());
200200
get_struct()->base = base.ptr();

0 commit comments

Comments
 (0)