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

[Containers] fix bug in DenseAxisArrayView #3180

Merged
merged 2 commits into from
Jan 9, 2023
Merged

Conversation

odow
Copy link
Member

@odow odow commented Jan 8, 2023

Closes #3175. I overlooked the part where taking a view drops the dimension if it contains a single element.

@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Base: 98.07% // Head: 97.42% // Decreases project coverage by -0.64% ⚠️

Coverage data is based on head (0b5ae50) compared to base (1024661).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3180      +/-   ##
==========================================
- Coverage   98.07%   97.42%   -0.65%     
==========================================
  Files          33       33              
  Lines        4563     4115     -448     
==========================================
- Hits         4475     4009     -466     
- Misses         88      106      +18     
Impacted Files Coverage Δ
src/Containers/DenseAxisArray.jl 93.77% <100.00%> (-2.15%) ⬇️
src/precompile.jl 0.00% <0.00%> (-100.00%) ⬇️
src/Containers/Containers.jl 88.88% <0.00%> (-2.78%) ⬇️
src/mutable_arithmetics.jl 86.20% <0.00%> (-2.15%) ⬇️
src/operators.jl 94.58% <0.00%> (-2.06%) ⬇️
src/Containers/SparseAxisArray.jl 97.36% <0.00%> (-1.07%) ⬇️
src/JuMP.jl 95.35% <0.00%> (-0.75%) ⬇️
src/aff_expr.jl 96.69% <0.00%> (-0.56%) ⬇️
src/constraints.jl 96.15% <0.00%> (-0.35%) ⬇️
... and 21 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@odow
Copy link
Member Author

odow commented Jan 9, 2023

@metab0t do you want to test this branch out?

@metab0t
Copy link
Contributor

metab0t commented Jan 9, 2023

x-ref: #3175 (comment)

@odow
Copy link
Member Author

odow commented Jan 9, 2023

Try now

@metab0t
Copy link
Contributor

metab0t commented Jan 9, 2023

The dimension of view is correct now.

@odow
Copy link
Member Author

odow commented Jan 9, 2023

This whole notion of a view into a dense axis array is messy, because view of normal arrays assume everything is 1-indexed. I probably missed a few other methods. It's a shame Julia doesn't have formal interfaces for subtypes.

@metab0t
Copy link
Contributor

metab0t commented Jan 9, 2023

Implementing a full-featured custom array type (to act like internal Array) in Julia requires a lot of work due to the expansion of API.
Anyway, having proper support of view for DenseAxisArray is great!

@odow odow merged commit 98f1bee into master Jan 9, 2023
@odow odow deleted the od/fix-denseaxisarrayview branch January 9, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bug in DenseAxisArrayView
3 participants