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

AbstractArray -> StridedArray #22

Open
willtebbutt opened this issue Apr 26, 2021 · 0 comments
Open

AbstractArray -> StridedArray #22

willtebbutt opened this issue Apr 26, 2021 · 0 comments

Comments

@willtebbutt
Copy link
Member

#21 essentially points out that we have the same problem that we see regularly in the AD world, where a sensible implementation of flatten for e.g. a sparse array or Fill is not the same as a sensible implementation for e.g. a StridedArray.

Should be a quick fix. We probably need to copy over + tweak the code for to_vec for general structs so that flatten gives you the struct interpretation of an array by default.

Disclaimer: I'm assuming thay if a user writes Fill(5.0, 10) then they want to constrain this vector to be a Fill throughout e.g. optimisation, and that if this weren't the case said user would write fill(5.0, 10).

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

1 participant