1111
1212#include < cstddef>
1313#include < algorithm>
14+ #include < vector>
1415
1516#include " pybind11/numpy.h"
1617#include " pybind11_backport.hpp"
@@ -33,7 +34,7 @@ namespace xt
3334 class pyarray ;
3435
3536 template <class T , int ExtraFlags>
36- struct array_inner_types <pyarray<T, ExtraFlags>>
37+ struct xcontainer_inner_types <pyarray<T, ExtraFlags>>
3738 {
3839 using temporary_type = pyarray<T, ExtraFlags>;
3940 };
@@ -63,14 +64,14 @@ namespace xt
6364 */
6465 template <class T , int ExtraFlags = pybind_array::forcecast>
6566 class pyarray : public pybind_array ,
66- public xarray_semantic <pyarray<T, ExtraFlags>>
67+ public xcontainer_semantic <pyarray<T, ExtraFlags>>
6768 {
6869
6970 public:
7071
7172 using self_type = pyarray<T, ExtraFlags>;
7273 using base_type = pybind_array;
73- using semantic_base = xarray_semantic <self_type>;
74+ using semantic_base = xcontainer_semantic <self_type>;
7475 using value_type = T;
7576 using reference = T&;
7677 using const_reference = const T&;
@@ -89,8 +90,8 @@ namespace xt
8990 using storage_iterator = T*;
9091 using const_storage_iterator = const T*;
9192
92- using shape_type = xshape <size_type>;
93- using strides_type = xstrides <size_type>;
93+ using shape_type = std::vector <size_type>;
94+ using strides_type = std::vector <size_type>;
9495 using backstrides_type = pyarray_backstrides<self_type>;
9596
9697 using closure_type = const self_type&;
@@ -101,12 +102,12 @@ namespace xt
101102
102103 explicit pyarray (const buffer_info& info);
103104
104- pyarray (const xshape<size_type> & shape,
105- const xstrides<size_type> & strides,
105+ pyarray (const shape_type & shape,
106+ const strides_type & strides,
106107 const T* ptr = nullptr ,
107108 handle base = handle());
108109
109- explicit pyarray (const xshape<size_type> & shape,
110+ explicit pyarray (const shape_type & shape,
110111 const T* ptr = nullptr ,
111112 handle base = handle());
112113
@@ -231,16 +232,16 @@ namespace xt
231232 }
232233
233234 template <class T , int ExtraFlags>
234- inline pyarray<T, ExtraFlags>::pyarray(const xshape<size_type> & shape,
235- const xstrides<size_type> & strides,
235+ inline pyarray<T, ExtraFlags>::pyarray(const shape_type & shape,
236+ const strides_type & strides,
236237 const T *ptr,
237238 handle base)
238239 : pybind_array(shape, strides, ptr, base)
239240 {
240241 }
241242
242243 template <class T , int ExtraFlags>
243- inline pyarray<T, ExtraFlags>::pyarray(const xshape<size_type> & shape,
244+ inline pyarray<T, ExtraFlags>::pyarray(const shape_type & shape,
244245 const T* ptr,
245246 handle base)
246247 : pybind_array(shape, ptr, base)
@@ -546,9 +547,6 @@ namespace xt
546547 return std::inner_product (str.begin (), str.end (), iter, size_type (0 )) / itemsize ();
547548 }
548549
549- template <class T , int ExtraFlags>
550- inline auto pyarray<T, ExtraFlags>::data
551-
552550 template <class T , int ExtraFlags>
553551 constexpr auto pyarray<T, ExtraFlags>::itemsize() -> size_type
554552 {
0 commit comments