Skip to content

axis_slice_iterator and axis_iterator do not function with xtensors #2723

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

Open
dchansen opened this issue Aug 31, 2023 · 4 comments
Open

axis_slice_iterator and axis_iterator do not function with xtensors #2723

dchansen opened this issue Aug 31, 2023 · 4 comments

Comments

@dchansen
Copy link

axis slice iterator is broken when used with xtensors (godbolt) and axis_iterator simply does not compile.

This issue for both cases is that the strides_type and shape_type in axis_slice_iterator and axis_iterator are taken from the given xexpression, which is not correct for xtensor as the resulting strided_view should anyhow be dynamically sized.

The alternative would be to assign a dynamic strides and shape_type, but it was not clear to me what the correct replacement type should be.

@Stef-Sijben
Copy link

This appears to be a duplicate of #2116.

@spectre-ns
Copy link
Contributor

spectre-ns commented Nov 27, 2023

The godbolt example appears to compile in all 3 major compilers.

@dchansen
Copy link
Author

Yes - but they also produce the wrong output (see the output tab). The shape reported is (2, 0, 0) in this example

@spectre-ns
Copy link
Contributor

Yes - but they also produce the wrong output (see the output tab). The shape reported is (2, 0, 0) in this example

Ahh... Yes, I see that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants