You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dimension fetches fist item of AbstractArray even if empty #224
I am not sure how this should be circumvented. If the array is empty, it is obvious that all elements should be of the same type. It may require an additional dispatch.
Thanks! Yeah, I guess that dimension(::QuantityArray) should definitely work, even when the array is empty. I am surprised it is getting forwarded to the AbstractArray call... strange. @MilesCranmerBot can you please make a PR fixing this?
I am not sure how to handle the case of an empty AbstractArray. Maybe just promote the quantity type and return a dimensionless 1.0? But maybe that is a second issue.
Activity
MilesCranmer commentedon Jun 8, 2026
Thanks! Yeah, I guess that
dimension(::QuantityArray)should definitely work, even when the array is empty. I am surprised it is getting forwarded to theAbstractArraycall... strange. @MilesCranmerBot can you please make a PR fixing this?I am not sure how to handle the case of an empty
AbstractArray. Maybe just promote the quantity type and return a dimensionless 1.0? But maybe that is a second issue.MilesCranmerBot commentedon Jun 8, 2026
Opened PR: #226
Commit: 372fae1
Verified locally:
QuantityArray/parent-wrapper check passedPkg.test(; test_args=["Assorted unittests"])passed (10364 pass, 6 broken)Current PR checks are partly green with Julia 1 and docs still pending.