10000 Bring pyarray and pytensor up to date with xtensor 0.20.0 · xtensor-stack/xtensor-python@dc777e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc777e1

Browse files
committed
Bring pyarray and pytensor up to date with xtensor 0.20.0
In xtensor-stack/xtensor@bfa8879 , 3 type aliases introduced to xcontainer_inner_types specialization: * using reference = typename storage_type::reference; * using const_reference = typename storage_type::const_reference; * using size_type = typename storage_type::size_type; They should be added to xtensor-python to keep it working for xtensor 0.20.0.
1 parent 13cb819 commit dc777e1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/xtensor-python/pyarray.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ namespace xt
293293
struct xcontainer_inner_types<pyarray<T, L>>
294294
{
295295
using storage_type = xbuffer_adaptor<T*>;
296+
using reference = typename storage_type::reference;
297+
using const_reference = typename storage_type::const_reference;
298+
using size_type = typename storage_type::size_type;
296299
using shape_type = std::vector<typename storage_type::size_type>;
297300
using strides_type = std::vector<typename storage_type::difference_type>;
298301
using backstrides_type = pyarray_backstrides<pyarray<T, L>>;

include/xtensor-python/pytensor.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ namespace xt
112112
struct xcontainer_inner_types<pytensor<T, N, L>>
113113
{
114114
using storage_type = xbuffer_adaptor<T*>;
115+
using reference = typename storage_type::reference;
116+
using const_reference = typename storage_type::const_reference;
117+
using size_type = typename storage_type::size_type;
115118
using shape_type = std::array<npy_intp, N>;
116119
using strides_type = shape_type;
117120
using backstrides_type = shape_type;

0 commit comments

Comments
 (0)
0