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

fix cat for vectors with AnonDim #502

Merged
merged 8 commits into from
Aug 4, 2023
Merged

fix cat for vectors with AnonDim #502

merged 8 commits into from
Aug 4, 2023

Conversation

rafaqz
Copy link
Owner

@rafaqz rafaqz commented Jul 27, 2023

hcat and vcat were not tested with DimVector and were not actually working. This PR fixes that. It also standardises the output of cat on missing dimensions to use AnonDim so we always return a DimArray.

We also now rigorously check that the shared dimensions actually match all values as well as dimension type, and that span types are not mixed or broken (closes #433)

@sethaxen you may want a look at this, I think this was partly your code

Note: also fixed problems in docs in primatives as I used the keywords here

@rafaqz rafaqz requested a review from sethaxen July 27, 2023 13:03
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2023

Codecov Report

Merging #502 (3a985c0) into main (eb222fb) will decrease coverage by 0.38%.
The diff coverage is 97.61%.

❗ Current head 3a985c0 differs from pull request most recent head 2e9c13a. Consider uploading reports for the commit 2e9c13a to get more accurate results

@@            Coverage Diff             @@
##             main     #502      +/-   ##
==========================================
- Coverage   89.38%   89.01%   -0.38%     
==========================================
  Files          39       39              
  Lines        2846     2868      +22     
==========================================
+ Hits         2544     2553       +9     
- Misses        302      315      +13     
Files Changed Coverage Δ
src/array/methods.jl 94.80% <97.36%> (+0.04%) ⬆️
src/Dimensions/primitives.jl 93.88% <100.00%> (+0.46%) ⬆️
src/array/show.jl 82.35% <100.00%> (-12.75%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sethaxen
Copy link
Collaborator

I'll take a look at this later today.

Copy link
Collaborator

@sethaxen sethaxen left a comment

Choose a reason for hiding this comment

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

I don't see any obvious problems, but I did notice that a _print_matrix method in show.jl is no longer being covered by the test suite (hence the decrease in coverage).

src/array/show.jl Outdated Show resolved Hide resolved
src/array/show.jl Show resolved Hide resolved
@rafaqz
Copy link
Owner Author

rafaqz commented Aug 3, 2023

The show related changes are because we were catting together DimArrays in fragile ways that break now that cat has more checks.

I'll ckean up the coverage thanks for catching that.

@rafaqz rafaqz merged commit a057ca7 into main Aug 4, 2023
12 checks passed
@rafaqz rafaqz deleted the fix_vector_cat branch August 4, 2023 16:44
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.

cat on Regular Points creates incorrectly typed indices
3 participants