Skip to content

Broken integration with StatsBase on 0.28 (or 0.29)!!! #976

@Datseris

Description

@Datseris

I am reporting a BREAKING behavior that has occured somewhere between 0.28 and 0.29, and does not occur on 0.27.

Here is the MWE:

using DimensionalData
using StatsBase

A = DimArray(rand(50, 31), (X(), Y(10.0:40.0)))
W = weights(rand(size(A)...))
mean(A, W)
ERROR: TypeError: in keyword argument dims, expected Union{Colon, Int64}, got a value of type Tuple{Int64, Int64}
Stacktrace:
 [1] mean(A::DimMatrix{…}, w::Weights{…}; dims::Function)
   @ DimensionalDataStatsBase C:\Users\datse\.julia\packages\DimensionalData\omXy6\ext\DimensionalDataStatsBase.jl:10
 [2] mean(A::DimMatrix{…}, w::Weights{…})
   @ DimensionalDataStatsBase C:\Users\datse\.julia\packages\DimensionalData\omXy6\ext\DimensionalDataStatsBase.jl:9
 [3] top-level scope
   @ REPL[25]:1
Some type information was truncated. Use `show(err)` to see complete types.

I am surprised that such a thing was not caught in the test suite. I assume there are no tests that test the integration of DimensionalData.jl and StatsBase.jl via the extension module? I'd love to fix this issue but unfortunately I assume an internal change happened to DD between 0.27 to 0.29 that I have not understood.

EDIT: I am sorry about my tone, which was accussatory. I was very frustrated to find this out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions