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

Axes for transposed OffsetArray vector incorrect due to LinearAlgebra method

Open BioTurboNick opened this issue 7 months ago • 2 comments

Just opening this to track the underlying Julia issue: https://github.com/JuliaLang/julia/issues/52373

BioTurboNick avatar Dec 02 '23 16:12 BioTurboNick

Okay, so I suppose it's a bit bigger than that. Julia Base's issue is assuming that a transposed array will always have a 1-indexed first dimension. And it's true that OffsetArrays assumes that all nonspecified dimensions have the range 1:1.

I suppose my suggestion is that all unspecified dimensions should have a 0:0 range. But that would probably be considered breaking. So I'm open to other thoughts.

BioTurboNick avatar Dec 03 '23 14:12 BioTurboNick

At a minimum, it would be nice if centered could produce an object that was centered along all dimensions. Its docstring does suggest that is the intended outcome.

BioTurboNick avatar Dec 03 '23 14:12 BioTurboNick