Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix build error caused by upstream xtensor change (in xtensor master) #209
Conversation
The upstream change broke the build: xtensor-stack/xtensor@da7de15 Add pycontainer::is_contiguous to make xtensor happy.
|
Hello, I wonder if anyone has time to take a look at the fix? |
|
Hi, Sorry for the late reply. I think you also need to check that the first (if column_major) or last (if row_major) stride is 1, because we can have dynamic row_major layout for a view taking one element out of two for instance. |
For row-major (c contiguous), make sure the last stride is unity. For colunm-major (fortran contiguous), make sure the first stride is unity.
| { | ||
| if (PyArray_CHKFLAGS(python_array(), NPY_ARRAY_C_CONTIGUOUS)) | ||
| { | ||
| return 1 == this->strides().back(); |
This comment has been minimized.
This comment has been minimized.
yungyuc
Oct 9, 2019
•
Author
Contributor
I assume this->strides() cannot be empty, and the element cannot be 0.
|
@JohanMabille thanks a lot for the comments (it's not at all late). I am not yet familiar with the xtensor/xtensor-python API, so this hot fix is far from comprehensive. Your help is very much needed. |
|
@JohanMabille Is there something that I can improve in the PR? |
|
I think the strides should not be considered as non empty. |
yungyuc commentedOct 4, 2019
The upstream change broke the build: xtensor-stack/xtensor@da7de15
Add pycontainer::is_contiguous to make xtensor happy.