Skip to content

Commit 8534ce7

Browse files
committed
Remove conda recipe and fix build
1 parent 98de977 commit 8534ce7

File tree

6 files changed

+14
-61
lines changed

6 files changed

+14
-61
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ install:
2424
- conda info -a
2525
- conda install pytest -c conda-forge
2626
- cd test
27-
- conda install xtensor==0.1.1 pytest numpy pybind11==1.8.1 -c conda-forge
27+
- conda install xtensor==0.2.0 pytest numpy pybind11==1.8.1 -c conda-forge
2828
- xcopy /S %APPVEYOR_BUILD_FOLDER%\include %MINICONDA%\include
2929

3030
build_script:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ install:
5959
# Useful for debugging any issues with conda
6060
- conda info -a
6161
- cd test
62-
- conda install xtensor==0.1.1 pytest numpy pybind11==1.8.1 -c conda-forge
62+
- conda install xtensor==0.2.0 pytest numpy pybind11==1.8.1 -c conda-forge
6363
- cp -r $TRAVIS_BUILD_DIR/include/* $HOME/miniconda/include/
6464

6565
script:

conda.recipe/bld.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

conda.recipe/build.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

conda.recipe/meta.yaml

Lines changed: 0 additions & 41 deletions
This file was deleted.

include/xtensor-python/pyarray.hpp

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
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

Comments
 (0)