Skip to content

Commit 15355f5

Browse files
committed
Removed not implemented assign method from xchunked_array
1 parent c009384 commit 15355f5

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

include/xtensor/xchunked_array.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,6 @@ namespace xt
142142
template <class E>
143143
xchunked_array& operator=(const xexpression<E>& e);
144144

145-
template <class E>
146-
void assign(const xexpression<E>& e);
147-
148145
const shape_type& shape() const noexcept;
149146
layout_type layout() const noexcept;
150147
bool is_contiguous() const noexcept;

test/test_xchunked_array.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "xtensor/xbroadcast.hpp"
1313
#include "xtensor/xchunked_array.hpp"
1414
#include "xtensor/xcsv.hpp"
15+
#include "xtensor/xnoalias.hpp"
1516

1617
namespace xt
1718
{
@@ -112,4 +113,16 @@ namespace xt
112113
EXPECT_EQ(v, 3);
113114
}
114115
}
116+
117+
TEST(xchunked_array, noalias)
118+
{
119+
std::vector<std::size_t> shape = {10, 10, 10};
120+
std::vector<std::size_t> chunk_shape = {2, 2, 2};
121+
auto a = chunked_array<double>(shape, chunk_shape);
122+
xt::xarray<double> b = arange(1000).reshape({10, 10, 10});
123+
124+
noalias(a) = b;
125+
126+
EXPECT_EQ(a, b);
127+
}
115128
}

0 commit comments

Comments
 (0)