Skip to content

Ravel unravel #40

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

Closed
wants to merge 2 commits into from
Closed

Ravel unravel #40

wants to merge 2 commits into from

Conversation

mwiebe
Copy link
Member

@mwiebe mwiebe commented Feb 9, 2011

This generalizes unravel_index to work with an array of indices and use either 'C' or 'F' order, and adds its inverse operation, ravel_coords.

@charris
Copy link
Member

charris commented Feb 10, 2011

Done in 260824f..f30000b. I'm still not completely happy with the ravel_coords name. How about ravel_indexes or even ravel_index?

@mwiebe
Copy link
Member Author

mwiebe commented Feb 10, 2011

With ravel_indices (or ravel_indexes), the assymetry with unravel_index maybe helps to remember which direction it goes (ravel_indices means tuple -> index, unravel_index means index -> tuple). Maybe ravel_ndindex? There's got to be a good nomenclature that distinguishes between a flattened index and an ndim-tuple of indices that's short and intuitive.

@charris
Copy link
Member

charris commented Feb 10, 2011

Maybe multiindex.; Hmm... the two 'i's don't look so good but it sounds OK. Heteroindex, polyindex?

mattip referenced this pull request in mattip/numpy Mar 20, 2019
fangerer pushed a commit to hpyproject/numpy-hpy that referenced this pull request Jul 7, 2022
Merge in numpy-hpy from ss/missing-flagsobject to labs-hpy-port

* commit 'd1617ae2b091848c8b2f22ad35e98e5dc89e1f54':
  Add forgotten flagsobject.h
luyahan pushed a commit to plctlab/numpy that referenced this pull request Apr 25, 2024
This pull request was closed.
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.

2 participants