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

Investigate correctness of reshapes #129

Open
Ivorforce opened this issue Oct 10, 2024 · 0 comments
Open

Investigate correctness of reshapes #129

Ivorforce opened this issue Oct 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Ivorforce
Copy link
Owner

Ivorforce commented Oct 10, 2024

I just understood that reshapes can't always be views. I think xtensor should reject if reshape views if incompatible, but that doesn't seem to be the case:

	var array1 := nd.ones([10, 10], nd.Int8)
	print(nd.reshape(array1.get(nd.range(1, -1), nd.range(1, -1)), -1).shape())

(This should fail, but it doesn't, so what does it return?)

I think mostly nd.median might be at risk. But, we finally can use flatten() and reshape afterwards to fix it!

@Ivorforce Ivorforce added the bug Something isn't working label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant