Skip to content
New issue

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

Missing operator== for xt::fixed_shape #2376

Open
tailsu opened this issue May 12, 2021 · 1 comment · May be fixed by #2382
Open

Missing operator== for xt::fixed_shape #2376

tailsu opened this issue May 12, 2021 · 1 comment · May be fixed by #2382
Labels

Comments

@tailsu
Copy link

tailsu commented May 12, 2021

Repro:

#define XTENSOR_ENABLE_ASSERT 1
#include <xtensor/xfixed.hpp>

void test()
{
  xt::xtensor_fixed<int, xt::xshape<3>> a = {1,2,3};
  std::cout << xt::all(a <= 3) << std::endl;
}

Compilation fails with:

xtensor/xiterator.hpp:1118:38: error: invalid operands to binary expression ('const xt::fixed_shape<3>' and 'const xt::fixed_shape<3>')
        XTENSOR_ASSERT(this->shape() == rhs.shape());

The code works correctly when assertions are not enabled.

Tested on 0.23.9

@tdegeus tdegeus added the Bug label May 13, 2021
@tdegeus
Copy link
Member

tdegeus commented May 13, 2021

Looks like a bug indeed. A PR would be much appreciated!

@tailsu tailsu linked a pull request May 17, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants