Closed yungyuc closed 4 years ago
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.
@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.
Adding a test that passes a 0D array to a function expecting a pyarray
object could confirm that.
The upstream change broke the build: https://github.com/QuantStack/xtensor/commit/da7de15be73c396bc9ffb31fe8c630938c57ffe8
Add pycontainer::is_contiguous to make xtensor happy.