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

Simplify the indexing NDCubeSequence as cube #24

Closed
DanRyanIrish opened this issue Oct 30, 2017 · 1 comment
Closed

Simplify the indexing NDCubeSequence as cube #24

DanRyanIrish opened this issue Oct 30, 2017 · 1 comment

Comments

@DanRyanIrish
Copy link
Member

NDCubeSequence.index_as_cube calls cube_utils.index_sequence_as_cube which creates an item_tuple containing the information needed to slice the NDCubeSequence. But depending on whether the information requested as part of this slicing spans multiple cubes or not, and the way in which the user input the slice, item_tuple can take multiple forms which makes the code difficult to understand and debug. Therefore, the code should be simplified/make more intuitive, without changing the user-facing functionality.

One possible solution is to have a new class, say SequenceSlice, whose __init__ takes an slicing item and returns an object with the slice for the first, last, and intermediate cubes which are requested as part of the slicing. This object would have this information is the same format regardless of how the user input the original slicing information and so would make the under-the-hood code easier to follow and maintain.

Other suggestions are welcome.

@DanRyanIrish
Copy link
Member Author

Closed by #36 .

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