Commit 8549edf4 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

add some neat stuff I just learned about

parent 16135c1e
......@@ -171,7 +171,7 @@ void checkArray(const py::array &arr, const char *aname,
template<typename T> pyarr<T> provideArray(py::object &in,
const vector<size_t> &shape)
{
if (in.is(None))
if (in.is_none())
{
auto tmp_ = makeArray<T>(shape);
size_t sz = size_t(tmp_.size());
......@@ -188,7 +188,7 @@ template<typename T> pyarr<T> provideArray(py::object &in,
template<typename T> pyarr_c<T> provideCArray(py::object &in,
const vector<size_t> &shape)
{
if (in.is(None))
if (in.is_none())
{
auto tmp_ = makeArray<T>(shape);
size_t sz = size_t(tmp_.size());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment