JuliaArrays / OffsetArrays.jl

Fortran-like arrays with arbitrary, zero or negative starting indices.
Other
197 stars 40 forks source link

Axes for transposed OffsetArray vector incorrect due to LinearAlgebra method #339

Open BioTurboNick opened 10 months ago

BioTurboNick commented 10 months ago

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

BioTurboNick commented 10 months ago

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 commented 10 months ago

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.