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

Update Slicing #6

Merged
merged 4 commits into from
Feb 27, 2023
Merged

Update Slicing #6

merged 4 commits into from
Feb 27, 2023

Conversation

PythonFZ
Copy link
Member

@PythonFZ PythonFZ commented Feb 21, 2023

  • add advanced slicing + tests
  • fix permutation in advanced slicing
  • add numpy intergation tests for advanced slicing

@PythonFZ PythonFZ linked an issue Feb 21, 2023 that may be closed by this pull request
Comment on lines 56 to 61
assert znslice.utils.get_matched_indices(
selected=[0, 2], available=[[0, 1], [10, 11]], single_item=False
) == [[0], [10]]
assert znslice.utils.get_matched_indices(
selected=[2, 0], available=[[0, 1], [10, 11]], single_item=False
) == [[0], [10]]
Copy link
Member Author

@PythonFZ PythonFZ Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea behind this prohibits unsorted gathering. It will return the indices per available so jumpy between the available data are not possible.

Possible Solutions

  • Don't do relativ indices but absolut indices - i.e. remove get_matched_indices at all

@PythonFZ PythonFZ marked this pull request as ready for review February 27, 2023 13:00
@PythonFZ PythonFZ mentioned this pull request Feb 27, 2023
@PythonFZ PythonFZ merged commit e1babee into main Feb 27, 2023
@PythonFZ PythonFZ deleted the 5-support-all-negative-index-gathering branch February 27, 2023 13:01
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.

Support all negative index gathering
1 participant