Skip to content

Bug: mean over dimension does not remove dimension #545

@briochemc

Description

@briochemc

Contrary to what the docs say here: https://juliadatacubes.github.io/YAXArrays.jl/stable/UserGuide/compute.html#mapslices

That is, copying the docs:

mapslices(mean, a, dims="time")

retains the dimension attribute (the time dimension does not match the array size anymore):

1×10×15 YAXArray{Float64, 3} ┐
├──────────────────────────────┴───────────────────────────────────────── dims ┐
   time Sampled{IntervalSets.ClosedInterval{Date}} [2022-01-01 .. 2022-01-30] ForwardOrdered Irregular Intervals{Start},
   lon Sampled{Float64} 1.0:1.0:10.0 ForwardOrdered Regular Points,
  ↗ lat Sampled{Float64} 1.0:0.2857142857142857:5.0 ForwardOrdered Regular Points
├─────────────────────────────────────────────────────────────── loaded lazily ┤
  data size: 1.17 KB
└──────────────────────────────────────────────────────────────────────────────┘

That's a bug right?

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