While considering #257, I found that the code can be refactored.
Aggregation tests are failing since Scipy changed the behaviour of stats functions.
Description of changes
Refactoring the code of the Datasources module.
Fix weighted_mode function: Before stats.mode had keepdims=True like behaviour by default, which changed in 1.11. Since it is False, now the result is a one-dimensional vector, so I removed the part of the code that extracts the first column. I also limited the version of Scipy to >=1.9 since it is the first version offering the keepdims parameter.
Issue
Description of changes
keepdims=True
like behaviour by default, which changed in 1.11. Since it isFalse,
now the result is a one-dimensional vector, so I removed the part of the code that extracts the first column. I also limited the version of Scipy to >=1.9 since it is the first version offering thekeepdims
parameter.Includes