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

hvncat: enable concatenations to return an array of the same kind #41194

Merged
merged 5 commits into from
Jun 14, 2021

Conversation

BioTurboNick
Copy link
Contributor

Breaking down #41143 into smaller pieces.

This PR relies on similar to return specialty array types when possible, just like hvcat already does.

The several specific cat_similar methods cut down allocations.

@simeonschaub simeonschaub added arrays [a, r, r, a, y, s] backport 1.7 labels Jun 11, 2021

@testset "multidimensional concatenation returns BitArrays" begin
a = BitVector(ones(5))
@test typeof([a ;;; a]) <: BitArray
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@test typeof([a ;;; a]) <: BitArray
@test [a ;;; a] isa BitArray

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It got merged without this suggestion; should I add it to a new PR?

@JeffBezanson JeffBezanson merged commit 2f1a958 into JuliaLang:master Jun 14, 2021
KristofferC pushed a commit that referenced this pull request Jun 17, 2021
@KristofferC KristofferC mentioned this pull request Jun 17, 2021
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants