| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -473,7 +473,11 @@ namespace xt | |||
| 473 | 473 | template <class D> | |
| 474 | 474 | inline bool pycontainer<D>::is_contiguous() const noexcept | |
| 475 | 475 | { | |
| 476 | - if (PyArray_CHKFLAGS(python_array(), NPY_ARRAY_C_CONTIGUOUS)) | ||
| 476 | + if (this->strides().size() == 0) | ||
| 477 | + { | ||
| 478 | + return true; | ||
| 479 | + } | ||
| 480 | + else if (PyArray_CHKFLAGS(python_array(), NPY_ARRAY_C_CONTIGUOUS)) | ||
| 477 | 481 | { | |
| 478 | 482 | return 1 == this->strides().back(); | |
| 479 | 483 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments