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

Deprecate the omission of trailing indices over non-singleton dimensions #23628

Merged
merged 2 commits into from
Sep 22, 2017

Conversation

mbauman
Copy link
Sponsor Member

@mbauman mbauman commented Sep 7, 2017

This is the final step that finally closes #14770 and completes the circle on trailing indices and singleton dimensions. After this deprecation goes through, the final state of affairs will be:

  • You are permitted to index into arrays with more indices than dimensions, but all trailing indices must be 1. (This is the status quo before, too.)
  • You are permitted to index into arrays with fewer indices than dimensions, but the length of all the omitted dimensions must be 1. (This is the part that's becoming more restrictive.)

I haven't run the full test-suite yet, so I imagine there may be a few deprecations there that I've missed. And I still need to add NEWS. But This is, by and large, a very benign change. Very few places seem to be relying on this behavior.

@mbauman mbauman added domain:arrays [a, r, r, a, y, s] kind:deprecation This change introduces or involves a deprecation labels Sep 7, 2017
@mbauman mbauman added this to the 1.0 milestone Sep 7, 2017
@mbauman mbauman added the needs news A NEWS entry is required for this change label Sep 7, 2017
@mbauman mbauman changed the title WIP: Deprecate the omission of trailing indices over non-singleton dimensions Deprecate the omission of trailing indices over non-singleton dimensions Sep 15, 2017
@mbauman mbauman removed the needs news A NEWS entry is required for this change label Sep 15, 2017
mbauman added a commit that referenced this pull request Sep 15, 2017
This fixes issue #23629 for 0.6. It is done independently from the fix for master (in #23628) due to all the deprecation changes.
ararslan pushed a commit that referenced this pull request Sep 18, 2017
This fixes issue #23629 for 0.6. It is done independently from the fix for master (in #23628) due to all the deprecation changes.
ararslan pushed a commit that referenced this pull request Sep 18, 2017
This fixes issue #23629 for 0.6. It is done independently from the fix for master (in #23628) due to all the deprecation changes.
@mbauman
Copy link
Sponsor Member Author

mbauman commented Sep 19, 2017

I have squashed the commits down more sensibly. Once CI passes this is good to go.

@mbauman
Copy link
Sponsor Member Author

mbauman commented Sep 22, 2017

Failures are simply Travis Mac horribleness and #23796.

@mbauman mbauman merged commit b752b87 into master Sep 22, 2017
@mbauman mbauman deleted the mb/14470-final branch September 22, 2017 14:55
@StefanKarpinski
Copy link
Sponsor Member

giphy

mbauman added a commit that referenced this pull request Oct 20, 2017
In #23628, we deprecated omitting indices over dimensions that are not of length 1.  Unfortunately the 0-index case got left behind.  This brings it into consistency.

In short, once this deprecation is removed, `A[]` will _also_ assert that there is only one element in `A`.
JeffBezanson pushed a commit that referenced this pull request Oct 23, 2017
In #23628, we deprecated omitting indices over dimensions that are not of length 1.  Unfortunately the 0-index case got left behind.  This brings it into consistency.

In short, once this deprecation is removed, `A[]` will _also_ assert that there is only one element in `A`.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:arrays [a, r, r, a, y, s] kind:deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deprecate (then remove) generalized linear indexing
2 participants