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

Split AsTarget and AsTargetMut into 1D and 2D traits #195

Closed
YuhanLiin opened this issue Jan 23, 2022 · 2 comments
Closed

Split AsTarget and AsTargetMut into 1D and 2D traits #195

YuhanLiin opened this issue Jan 23, 2022 · 2 comments

Comments

@YuhanLiin
Copy link
Collaborator

AsTarget and AsTargetMut support return 1D and 2D targets. However, most uses of the traits require either 1D targets or 2D targets, but never both. Also, some impls don't support 1D targets, so try_single_target() has to return a Result to handle that case. I propose that we split AsTarget into AsSingleTarget and AsMultiTarget (same with AsTargetMut) and implement them on ArrayView1 and ArrayView2 respectively. Trait bounds will be changed to use one or the other. What do you think @bytesnake ?

@PABannier
Copy link
Contributor

PABannier commented Feb 20, 2022

I think that would be of great help, especially to support multi-task models! I can work on it. Actually without that kind of tweak, I'm stuck with #194 .

@YuhanLiin
Copy link
Collaborator Author

Closed by #206

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

2 participants