We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inline auto add(xt::pyarray<double> &a, xt::pyarray<double> &b) { auto res = xt::pyarray<double>(); res.reshape(a.shape()); xt::noalias(res) = (a + b); return res; }
fails to compile with:
src/main.cpp: In function ‘auto add(xt::pyarray<double>&, xt::pyarray<double>&)’: src/main.cpp:26:26: error: no matching function for call to ‘xt::pyarray<double>::reshape(const inner_shape_type&)’ res.reshape(a.shape()); ^ In file included from /home/wolfv/Programs/xtensor-python/include/xtensor-python/pyarray.hpp:20:0, from src/main.cpp:8: /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:222:17: note: candidate: void xt::pycontainer<D>::reshape(const shape_type&) [with D = xt::pyarray<double>; xt::pycontainer<D>::shape_type = std::vector<long unsigned int>] inline void pycontainer<D>::reshape(const shape_type& shape) ^~~~~~~~~~~~~~ /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:222:17: note: no known conversion for argument 1 from ‘const inner_shape_type {aka const xt::xbuffer_adaptor<long unsigned int>}’ to ‘const shape_type& {aka const std::vector<long unsigned int>&}’ /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:236:17: note: candidate: void xt::pycontainer<D>::reshape(const shape_type&, xt::layout_type) [with D = xt::pyarray<double>; xt::pycontainer<D>::shape_type = std::vector<long unsigned int>] inline void pycontainer<D>::reshape(const shape_type& shape, layout_type l) ^~~~~~~~~~~~~~ /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:236:17: note: candidate expects 2 arguments, 1 provided /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:249:17: note: candidate: void xt::pycontainer<D>::reshape(const shape_type&, const strides_type&) [with D = xt::pyarray<double>; xt::pycontainer<D>::shape_type = std::vector<long unsigned int>; xt::pycontainer<D>::strides_type = std::vector<long unsigned int>] inline void pycontainer<D>::reshape(const shape_type& shape, const strides_type& strides) ^~~~~~~~~~~~~~ /home/wolfv/Programs/xtensor-python/include/xtensor-python/pycontainer.hpp:249:17: note: candidate expects 2 arguments, 1 provided
The text was updated successfully, but these errors were encountered:
No branches or pull requests
fails to compile with:
The text was updated successfully, but these errors were encountered: