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

reshape for offset AbstractVectors with Tuple{Colon} as indices #41599

Merged
merged 2 commits into from
Jul 18, 2021

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Jul 15, 2021

On master

julia> reshape(Base.IdentityUnitRange(3:4), :)
Base.IdentityUnitRange(3:4)

julia> reshape(Base.IdentityUnitRange(3:4), (:,))
ERROR: ArgumentError: offset arrays are not supported but got an array with index other than 1

After this PR

julia> reshape(Base.IdentityUnitRange(3:4), (:,))
Base.IdentityUnitRange(3:4)

This makes the Vararg and Tuple methods behave identically.

@jishnub
Copy link
Contributor Author

jishnub commented Jul 17, 2021

Test failure seems unrelated. Could someone please review this?

@timholy timholy merged commit 9044222 into JuliaLang:master Jul 18, 2021
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