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

allow vcat on single ChainedVector #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stuartthomas25
Copy link

Formerly, vcat(a::ChainedVector) would fail with an error. This PR adds a method to match the typical Julia behavior that vcat(a)=a.

Formerly, `vcat(a::ChainedVector)` would fail with an error.
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.73%. Comparing base (fa840f9) to head (132495d).

Files Patch % Lines
src/chainedvector.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
- Coverage   94.82%   94.73%   -0.10%     
==========================================
  Files           5        5              
  Lines        1043     1044       +1     
==========================================
  Hits          989      989              
- Misses         54       55       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JoaoAparicio
Copy link
Contributor

One observation: The typical Julia behavior is that vcat copies its inputs:

x = [1,2,3]
vcat(x) === x  # false

whereas here

x = ChainedVector([[1,2,3],[4,5]])
vcat(x) === x  # true

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