Add test to assign chunked array to chunked array
Looks like we can't assign an xarray to a chunked file array.
OK so this is because:
// not correct:
auto a = xt::arange(4 * 4).reshape({4, 4});
// correct:
auto a = xt::arange(4 * 4);
a.reshape({4, 4});
This is a different behavior than NumPy, where you do:
a = np.arange(4 * 4).reshape(4, 4)
/usr/share/miniconda/envs/xtensor-io/include/xtensor/xnoalias.hpp:165:32: error: invalid initialization of non-const reference of type 'xt::xchunked_array<xt::xchunk_store_manager<xt::xfile_array_container<xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>, xt::xio_disk_handler<xt::xio_binary_config> >, xt::xindex_path>, xt::empty_extension>&' from an rvalue of type 'void'
165 | return m_array.assign(e);
|
The root cause is that noalias does not work with chunked_array. This has to be fixed in xtensor.
https://github.com/xtensor-stack/xtensor/pull/2256 should fix it.
xtensor-stack/xtensor#2256 should fix it.
It fixes it. I'll remove the dependency on master in this PR when we get an xtensor release.
Let's fix it after the release.