SentinelArrays.jl icon indicating copy to clipboard operation
SentinelArrays.jl copied to clipboard

allow vcat on single ChainedVector

Open stuartthomas25 opened this issue 11 months ago • 2 comments

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

stuartthomas25 avatar Mar 19 '24 18:03 stuartthomas25

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 :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 19 '24 18:03 codecov[bot]

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

JoaoAparicio avatar Jul 07 '24 09:07 JoaoAparicio