Skip to content

Reductions do not preserve type #55

@tknopp

Description

@tknopp
julia> AxisArray(randn(3,3), (:x,:y),(0.1,0.1),(-0.1,-0.2))
2-dimensional AxisArray{Float64,2,...} with axes:
    :x, -0.1:0.1:0.1
    :y, -0.2:0.1:0.0
And data, a 3×3 Array{Float64,2}:
 0.763468   0.587158  0.520983 
 0.0610593  0.801456  0.721546 
 0.755276   0.834483  0.0795272

julia> maximum(B,2)
3×1 Array{Float64,2}:
 0.763468
 0.801456
 0.834483

julia> B[:,2]
1-dimensional AxisArray{Float64,1,...} with axes:
    :x, -0.1:0.1:0.1
And data, a 3-element Array{Float64,1}:
 0.587158
 0.801456
 0.834483

I would have expected that maximum also returns an AxisArray. This was the case with the old Image object.

ping @timholy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions