From 075106b4374fa035a05639768232ea5d2dc9e927 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Mon, 4 Sep 2017 22:27:33 +0200 Subject: [PATCH] Adjustments for xtensor 0.11 --- README.md | 8 ++++---- include/xtensor-python/pyarray.hpp | 3 ++- include/xtensor-python/pycontainer.hpp | 1 - include/xtensor-python/pytensor.hpp | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 61138b7..089b189 100644 --- a/README.md +++ b/README.md @@ -190,10 +190,10 @@ from the `docs` subdirectory. | `xtensor-python` | `xtensor` | `pybind11` | |-------------------|------------|-------------| | master | ^0.10.9 | ^2.1.0 | -| 0.12.x | ^0.10.2 | ^2.1.0 | -| 0.11.x | ^0.10.0 | ^2.1.0 | -| 0.10.x | ^0.9.0 | ^2.1.0 | -| 0.9.x | ^0.8.1 | ^2.1.0 | +| 0.12.x | ^0.10.2 | 2.1.\* | +| 0.11.x | ^0.10.0 | 2.1.\* | +| 0.10.x | ^0.9.0 | 2.1.\* | +| 0.9.x | ^0.8.1 | 2.1.\* | These dependencies are automatically resolved when using the conda package manager. diff --git a/include/xtensor-python/pyarray.hpp b/include/xtensor-python/pyarray.hpp index 29b877b..2247a91 100644 --- a/include/xtensor-python/pyarray.hpp +++ b/include/xtensor-python/pyarray.hpp @@ -113,6 +113,7 @@ namespace xt using inner_strides_type = pystrides_adaptor; using inner_backstrides_type = backstrides_type; using temporary_type = pyarray; + static constexpr layout_type layout = layout_type::dynamic; }; /** @@ -386,7 +387,7 @@ namespace xt */ template inline pyarray::pyarray(const self_type& rhs) - : base_type() + : base_type(), semantic_base(rhs) { auto tmp = pybind11::reinterpret_steal( PyArray_NewLikeArray(rhs.python_array(), NPY_KEEPORDER, nullptr, 1)); diff --git a/include/xtensor-python/pycontainer.hpp b/include/xtensor-python/pycontainer.hpp index cb077cd..5a19f2e 100644 --- a/include/xtensor-python/pycontainer.hpp +++ b/include/xtensor-python/pycontainer.hpp @@ -13,7 +13,6 @@ #include #include -#include "pybind11/common.h" #include "pybind11/complex.h" #include "pybind11/pybind11.h" diff --git a/include/xtensor-python/pytensor.hpp b/include/xtensor-python/pytensor.hpp index bf5a36c..296b60b 100644 --- a/include/xtensor-python/pytensor.hpp +++ b/include/xtensor-python/pytensor.hpp @@ -94,6 +94,7 @@ namespace xt using inner_strides_type = strides_type; using inner_backstrides_type = backstrides_type; using temporary_type = pytensor; + static constexpr layout_type layout = layout_type::dynamic; }; /**