Might read better if broken into three lines:
```
if (PyArray_Check(ret) &&
        PyArray_NDIM((PyArrayObject *)ret) == 0 &&
        !_check_ellipses(op)) {
```