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
I'm trying to do a multiselection, like so:
#include "xframe/xvariable.hpp" #include "xframe/xvariable_view.hpp" int main(int argc, char* argv[]) { auto dim = xf::dimension({"lat", "lon"}); auto coord = xf::coordinate({{"lat", xf::axis({"a", "b", "c"})}, {"lon", xf::axis({"d", "e", "f"})}}); xt::xarray<double> data {{1., 2., 3.}, {4., 5., 6.}, {7., 8., 9.}}; auto var = variable(data, coord, dim); std::cout << var << std::endl; std::cout << xf::select(var, {{"lat", xf::range("a", "b")}, {"lon", xf::range("d", "f")}}) << std::endl; return 0; }
But I get the following error:
In file included from /home/david/tmp/xframe/test.cc:2:0: /home/david/soft/miniconda3/include/xframe/xvariable_view.hpp: In instantiation of 'struct xt::xcontainer_inner_types<xf::xvariable_view<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>&> >': /home/david/soft/miniconda3/include/xtensor/xsemantic.hpp:38:82: required from 'class xt::xsemantic_base<xf::xvariable_view<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>&> >' /home/david/soft/miniconda3/include/xtensor/xsemantic.hpp:196:11: required from 'class xt::xview_semantic<xf::xvariable_view<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>&> >' /home/david/soft/miniconda3/include/xframe/xvariable_view.hpp:63:11: required from 'class xf::xvariable_view<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>&>' /home/david/soft/miniconda3/include/xframe/xvariable_view.hpp:1098:60: required from 'auto xf::select(E&&, std::map<typename std::decay<_Tp>::type::key_type, xf::xaxis_slice<L> >&&) [with E = xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>&; L = xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >; typename std::decay<_Tp>::type::key_type = xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >]' /home/david/tmp/xframe/test.cc:17:94: required from here /home/david/soft/miniconda3/include/xframe/xvariable_view.hpp:54:113: error: 'xf::xvariable_base<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&> >::value_type {aka double}' is not a class, struct, or union type using temporary_data_type = xoptional_assembly<xarray<typename optional_type::value_type>, xarray<bool>>; ^ /home/david/soft/miniconda3/include/xframe/xvariable_view.hpp:55:103: error: 'xf::xvariable_base<xf::xvariable_container<xf::xcoordinate<xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> >, xtl::mpl::vector<int, long unsigned int, char, xtl::xbasic_fixed_string<char, 55, 5, xtl::string_policy::silent_error, std::char_traits<char> > >, long unsigned int, xf::hash_map_tag>&, xt::xarray_container<xt::uvector<double, std::allocator<double> >, (xt::layout_type)1, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&> >::value_type {aka double}' is not a class, struct, or union type using temporary_type = xf::xvariable_container<temporary_coordinate_type, temporary_data_type>; ^
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to do a multiselection, like so:
But I get the following error:
The text was updated successfully, but these errors were encountered: