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

Extend matmul with DimUnitRange axes

Open sethaxen opened this issue 1 month ago • 4 comments

Extends matmul methods to construct an AbstractDimArray whenever one argument is an AbstractDimArray and the other has DimUnitRange axes. Fixes #1122

sethaxen avatar Oct 28 '25 16:10 sethaxen

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 82.53%. Comparing base (2e5a812) to head (8b08997). :warning: Report is 6 commits behind head on breaking.

Additional details and impacted files
@@             Coverage Diff              @@
##           breaking    #1124      +/-   ##
============================================
+ Coverage     82.43%   82.53%   +0.09%     
============================================
  Files            57       57              
  Lines          5647     5673      +26     
============================================
+ Hits           4655     4682      +27     
+ Misses          992      991       -1     

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

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 28 '25 17:10 codecov[bot]

One coincidental behavior change is that before this PR dim(fill(1)) === nothing. After this PR dim(fill(1)) == (). Not certain if this has any bad side effects.

sethaxen avatar Oct 28 '25 19:10 sethaxen

I guess there isn't really any answer to if fill(1) has dimensional axes

Maybe we can just add a dims(x::AbstractArray{<:Any, 0}) = nothing to not make this breaking

tiemvanderdeure avatar Oct 28 '25 21:10 tiemvanderdeure

~~Yeah lets special case it thats slightly undexpected.~~

Actually, fixing this will create ambiguities everywhere so we have to define dims twice for AbstractDimArray. Lets see if it causes any real problems first.

rafaqz avatar Oct 29 '25 06:10 rafaqz