Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:
- conda update -q conda
- conda info -a
- conda install gtest cmake -c conda-forge
- conda install xtensor==0.11.0 pytest numpy pybind11==2.1.1 -c conda-forge
- conda install xtensor==0.12.0 pytest numpy pybind11==2.1.1 -c conda-forge
- "set PYTHONHOME=%MINICONDA%"
- cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\Library -D BUILD_TESTS=ON -D PYTHON_EXECUTABLE=%MINICONDA%\\python.exe .
- nmake test_xtensor_python
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ install:
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda install xtensor==0.11.0 pytest numpy pybind11==2.1.1 -c conda-forge
- conda install xtensor==0.12.0 pytest numpy pybind11==2.1.1 -c conda-forge
- conda install cmake gtest -c conda-forge
- cmake -D BUILD_TESTS=ON -D CMAKE_INSTALL_PREFIX=$HOME/miniconda .
- make -j2 test_xtensor_python
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ from the `docs` subdirectory.

| `xtensor-python` | `xtensor` | `pybind11` |
|-------------------|------------|-------------|
| master | ^0.11.0 | ^2.1.0 |
| master | ^0.12.0 | ^2.1.0 |
| 0.13.x | ^0.11.0 | ^2.1.0 |
| 0.12.x | ^0.10.2 | 2.1.\* |
| 0.11.x | ^0.10.0 | 2.1.\* |
Expand Down
8 changes: 4 additions & 4 deletions include/xtensor-python/pyarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ namespace xt
: base_type()
{
// TODO: avoid allocation
shape_type shape = make_sequence<shape_type>(0, size_type(1));
strides_type strides = make_sequence<strides_type>(0, size_type(0));
shape_type shape = xtl::make_sequence<shape_type>(0, size_type(1));
strides_type strides = xtl::make_sequence<strides_type>(0, size_type(0));
init_array(shape, strides);
m_data[0] = T();
}
Expand Down Expand Up @@ -661,8 +661,8 @@ namespace xt
: base_type()
{
// TODO: prevent intermediary shape allocation
shape_type shape = forward_sequence<shape_type>(e.derived_cast().shape());
strides_type strides = make_sequence<strides_type>(shape.size(), size_type(0));
shape_type shape = xtl::forward_sequence<shape_type>(e.derived_cast().shape());
strides_type strides = xtl::make_sequence<strides_type>(shape.size(), size_type(0));
compute_strides(shape, layout_type::row_major, strides);
init_array(shape, strides);
semantic_base::assign(e);
Expand Down
4 changes: 3 additions & 1 deletion include/xtensor-python/pycontainer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include "xtensor/xcontainer.hpp"

#include "xtl/xsequence.hpp"

namespace xt
{

Expand Down Expand Up @@ -233,7 +235,7 @@ namespace xt
template <class D>
inline void pycontainer<D>::reshape(const shape_type& shape, layout_type l)
{
strides_type strides = make_sequence<strides_type>(shape.size(), size_type(1));
strides_type strides = xtl::make_sequence<strides_type>(shape.size(), size_type(1));
compute_strides(shape, l, strides);
reshape(shape, strides);
}
Expand Down
8 changes: 4 additions & 4 deletions include/xtensor-python/pytensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ namespace xt
inline pytensor<T, N>::pytensor()
: base_type()
{
m_shape = make_sequence<shape_type>(N, size_type(1));
m_strides = make_sequence<strides_type>(N, size_type(0));
m_shape = xtl::make_sequence<shape_type>(N, size_type(1));
m_strides = xtl::make_sequence<strides_type>(N, size_type(0));
init_tensor(m_shape, m_strides);
m_data[0] = T();
}
Expand Down Expand Up @@ -360,8 +360,8 @@ namespace xt
inline pytensor<T, N>::pytensor(const xexpression<E>& e)
: base_type()
{
shape_type shape = forward_sequence<shape_type>(e.derived_cast().shape());
strides_type strides = make_sequence<strides_type>(N, size_type(0));
shape_type shape = xtl::forward_sequence<shape_type>(e.derived_cast().shape());
strides_type strides = xtl::make_sequence<strides_type>(N, size_type(0));
compute_strides(shape, layout_type::row_major, strides);
init_tensor(shape, strides);
semantic_base::assign(e);
Expand Down
6 changes: 4 additions & 2 deletions test/test_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "xtensor/xlayout.hpp"
#include "xtensor/xstridedview.hpp"

#include "xtl/xsequence.hpp"

namespace xt
{
template <class T, class A>
Expand Down Expand Up @@ -218,7 +220,7 @@ namespace xt
using strides_type = typename V::strides_type;
{
SCOPED_TRACE("transpose");
shape_type shape_new = xt::make_sequence<shape_type>(vec.dimension(), 0);
shape_type shape_new = xtl::make_sequence<shape_type>(vec.dimension(), 0);
std::copy(vec.shape().cbegin(), vec.shape().cend(), shape_new.begin());
auto vt = transpose(vec);
std::reverse(shape_new.begin(), shape_new.end());
Expand Down Expand Up @@ -268,7 +270,7 @@ namespace xt

auto vec_copy = vec;

shape_type a = xt::make_sequence<shape_type>(vec.dimension(), 0);
shape_type a = xtl::make_sequence<shape_type>(vec.dimension(), 0);
std::copy(vec.shape().cbegin(), vec.shape().cend(), a.begin());
auto vt = transpose(vec, {1, 0, 2});
shape_type shape_new = {a[1], a[0], a[2]};
Expand Down