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

Replace subsets by grouping? #21

Open
mschubert opened this issue Mar 1, 2018 · 0 comments
Open

Replace subsets by grouping? #21

mschubert opened this issue Mar 1, 2018 · 0 comments
Labels

Comments

@mschubert
Copy link
Owner

mschubert commented Mar 1, 2018

This would provide a group function that adds a narray_grouped class to an object and indicates which axis the group is on.

Then, map, lambda, split etc. would be S3 generics where .narray_grouped would trigger splitting the object in subsets, applying the original function, and assembling the result.

The advantage would be that the code for subsets does not get mangled up in the original functions, hence keeping them simpler and more easily maintainable.

Issues:

  • For lamda, does one array need to be grouped? All of them? How to tell the difference? (but on the other hand could do different subsets on different axes)

Proposed solution:

  • add map_one, lambda_one functions but do lambda subsets in wrapping, no narray_grouped as S3 generic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant