rafaqz / DimensionalData.jl

Named dimensions and indexing for julia arrays and other data
https://rafaqz.github.io/DimensionalData.jl/stable/
MIT License
274 stars 39 forks source link

mapslices on in memory vector fails #643

Closed felixcremer closed 7 months ago

felixcremer commented 7 months ago

The following fails on master while it worked on 0.25.8 but had the wrong dimension after the reduction.

    x = Dim{:axis1}(1:10)
    yax = DimArray(rand(10), x)
    r = mapslices(sum, yax, dims=:axis1)

I suspect that this was broken in #606 and it seems to come from hitting the single argument view defined here https://github.com/rafaqz/DimensionalData.jl/blob/d7f8d1f3c5c9f46395c603d00a017c5d9c41f9ee/src/array/indexing.jl#L10