-
-
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
Disambiguate sub2ind #18352
Disambiguate sub2ind #18352
Conversation
@@ -1609,7 +1609,10 @@ _div(ind, d::Integer) = div(ind, d), 1, d | |||
_div(ind, r::AbstractUnitRange) = (d = unsafe_length(r); (div(ind, d), first(r), d)) | |||
|
|||
# Vectorized forms | |||
function sub2ind{N,T<:Integer}(inds::Union{Dims{N},Indices{N}}, I::AbstractVector{T}...) | |||
sub2ind{T<:Integer}(inds::Indices{1}, I1::AbstractVector{T}, I::AbstractVector{T}...) = throw(ArgumentError("Linear indexing is not defined for one-dimensional arrays")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrap this?
Does |
Seems to, at least in this direction. |
but will it serve the purpose of test_broken correctly? if something fixes the issue, will the test_broken flag it when it happens, or silently pass? |
It'll silently pass, since
|
Shall I just delete the test? Or comment it out? |
don't use test_broken, but do check the current result with a comment that it's currently wrong and should be fixed |
Also adds a broken test for #18307
OK, see if this is better. |
Also adds a broken test for #18307