-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Zero-dimensional views of AbstractVectors assume that the parent is 1-indexed #37274
Comments
I often struggle to remember last Tuesday, so I don't recall anything useful, but that looks like it predates offset axes (going by the blog post date). Thanks for catching this use case, @jishnub. @stevengj, that line enacts the "linear indexing starts at 1" policy with the exemption for 1d arrays on Lines 377 to 378 in 41e603e
I'm guessing we need a 0-dimensional exemption as well? |
The underlying array is 1d in this case, and since this is computing an offset index into the original array shouldn't the 1d exemption apply? |
A question: would this bug affect the ordering of an OffsetArray (I_Ωpp) being written out via a Numpy call of the form Ooops. Edited to add: |
This is the same issue reported in OffsetArrays, but I'm posting it here as I'm not sure if the fix should go into
Base
. Please close this if it's more appropriate for the fix to be inOffsetArrays
.For a zero-dimensional array
a
we usually expecta[] == a[1]
. However this does not work with zero-D views ofOffsetVector
sThe text was updated successfully, but these errors were encountered: