Skip to content
Snippets Groups Projects
Unverified Commit da26908d authored by Xavier Robin's avatar Xavier Robin
Browse files

fix: SCHWED-3149 update check for None in input.

Fixes the error "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()" in AddMesh.
parent b8121775
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ namespace {
float* vp=reinterpret_cast<float*>(PyArray_DATA(va));
float* np=0;
float* cp=0;
if(ona!=object()) {
if(!ona.is_none()) {
if(!PyArray_Check(ona.ptr())) {
throw Error("ona is not a numpy array");
}
......@@ -68,7 +68,7 @@ namespace {
}
np=reinterpret_cast<float*>(PyArray_DATA(na));
}
if(oca!=object()) {
if(!oca.is_none()) {
if(!PyArray_Check(oca.ptr())) {
throw Error("oca is not a numpy array");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment