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

Add split_indices #53

Merged
merged 1 commit into from
Feb 17, 2017
Merged

Add split_indices #53

merged 1 commit into from
Feb 17, 2017

Conversation

jakirkham
Copy link
Owner

@jakirkham jakirkham commented Feb 17, 2017

Closes #52

Adds a utility function, split_indices, for splitting up slices with multiple indices into a list of slices each with a single index. This is handy when working with libraries that accept slices that have a single index, but balk when multiple indices are provided. In these cases, one can split up the multiple indices into multiple slices, which can then be iterated over. Construction of the total result is up to user.

Note: This only works on slices that have a single list of indices. Support for multiple lists of indices does not currently exist and will require resolution of issue ( #57 ).

@jakirkham jakirkham force-pushed the add_split_indices branch 9 times, most recently from d3a31f9 to 67d3452 Compare February 17, 2017 19:14
@jakirkham jakirkham changed the title Add split_indices WIP: Add split_indices Feb 17, 2017
@jakirkham jakirkham changed the title WIP: Add split_indices Add split_indices Feb 17, 2017
@jakirkham jakirkham changed the title Add split_indices WIP: Add split_indices Feb 17, 2017
@jakirkham jakirkham force-pushed the add_split_indices branch 3 times, most recently from 081fbf0 to 4a81549 Compare February 17, 2017 20:58
@jakirkham jakirkham changed the title WIP: Add split_indices Add split_indices Feb 17, 2017
Adds a utility function, `split_indices`, for splitting up slices with
multiple indices into a list of slices each with a single index. This is
handy when working with libraries that accept slices that have a single
index, but balk when multiple indices are provided. In these cases, one
can split up the multiple indices into multiple slices, which can then
be iterated over. Construction of the total result is up to user.
@jakirkham jakirkham merged commit 4e2ff0a into master Feb 17, 2017
@jakirkham jakirkham deleted the add_split_indices branch February 17, 2017 21:55
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

Successfully merging this pull request may close these issues.

None yet

1 participant