Skip to content

Commit a4d99be

Browse files
committed
Stop using DEFAULT_LAYOUT macro
1 parent b2ce69d commit a4d99be

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
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 gtest cmake -c conda-forge
2626
- conda install pytest numpy pybind11==2.2.1 -c conda-forge
27-
- conda install xtensor==0.15.1 -c QuantStack
27+
- conda install xtensor==0.15.8 -c QuantStack
2828
- "set PYTHONHOME=%MINICONDA%"
2929
- cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\Library -D BUILD_TESTS=ON -D PYTHON_EXECUTABLE=%MINICONDA%\\python.exe .
3030
- nmake test_xtensor_python

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ before_install:
7575
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
7676
export CXX=clang++ CC=clang PYTHONHOME=$HOME/miniconda;
7777
fi
78-
78+
7979
install:
8080
# Define the version of miniconda to download
8181
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
@@ -97,7 +97,7 @@ install:
9797
- conda info -a
9898
- conda install pytest numpy pybind11==2.2.1 -c conda-forge
9999
- conda install cmake gtest -c conda-forge
100-
- conda install xtensor==0.15.1 -c QuantStack
100+
- conda install xtensor==0.15.8 -c QuantStack
101101
- cmake -D BUILD_TESTS=ON -D CMAKE_INSTALL_PREFIX=$HOME/miniconda .
102102
- make -j2 test_xtensor_python
103103
- make install

include/xtensor-python/pycontainer.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,7 @@ namespace xt
326326
throw std::runtime_error("Cannot reshape with incorrect number of elements.");
327327
}
328328

329-
if (layout == layout_type::dynamic || layout == layout_type::any)
330-
{
331-
layout = DEFAULT_LAYOUT;
332-
}
329+
layout = default_assignable_layout(layout);
333330

334331
NPY_ORDER npy_layout;
335332
if (layout == layout_type::row_major)

0 commit comments

Comments
 (0)