8000 Merge pull request #192 from yungyuc/update-for-xtensor-0.20.0 · robertodr/xtensor-python@4d0b4ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d0b4ff

Browse files
Merge pull request xtensor-stack#192 from yungyuc/update-for-xtensor-0.20.0
Bring pyarray and pytensor up to date with xtensor 0.20.0
2 parents 13cb819 + dc777e1 commit 4d0b4ff

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