Skip to content

Assignment to real part of complex array failed: class xt::xfunctor_view<> has no member named ‘data’ #2892

@starboerg

Description

@starboerg

Using the latest xtensor stack I realised that using xt::linalg:eig() from xtensor-blas results in an error when trying to assign to the real part of the complex results vector. I am using xsimd as well.

.../build/_deps/xtensor-blas-src/include/xtensor-blas/xlinalg.hpp:328:32: required from ‘auto xt::linalg::eig(const xt::xexpression&) [with E = xt::xarray_container<xt::uvector<double, xsimd::aligned_allocator<double, 32> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag>; std::enable_if_t<((bool)(! xtl::is_complex::value))>* = 0]’
328 | xt::real(eig_vals) = wr;
| ~~~~~~~~~~~~~~~~~~~^~~~

.../build/_deps/xtensor-src/include/xtensor/chunk/../chunk/../core/../core/../core/xassign.hpp:717:83: error: ‘class xt::xfunctor_view<xt::detail::offset_forwarder<double, 0>, xt::xtensor_container<xt::uvector<std::complex, xsimd::aligned_allocator<std::complex, 32> >, 1, xt::layout_type::row_major, xt::xtensor_expression_tag>&>’ has no member named ‘data’; did you mean ‘at’?
717 | size_type align_begin = is_aligned ? 0 : xt_simd::get_alignment_offset(e1.data(), size, simd_size);
| ~~~^~~~
| at

Maybe an issue guiding to the proper assignment.

size_type align_begin = is_aligned ? 0 : xt_simd::get_alignment_offset(e1.data(), size, simd_size);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions