daphne-eu / daphne

DAPHNE: An Open and Extensible System Infrastructure for Integrated Data Analysis Pipelines
Apache License 2.0
67 stars 62 forks source link

agg sum() of DaphneDSL does not work for aggregate per column #909

Closed m-birke closed 1 week ago

m-birke commented 1 week ago

sum(B, 1) returns a scalar as sum(B) but should return a (1 x m) (row) matrix

B = fill(5,4,1);
print(sum(B, 1));
philipportner commented 1 week ago

Hi @m-birke , it's fill(value:scalar, numRows:size, numCols:size), see here.

This is sadly different (not sure why) to how numpy does it with np.full, and should also require the shape to be passed as a shape/tuple so this mixup is not possible.

B = fill(1, 5, 4);
print(sum(B, 1));

DenseMatrix(1x4, int64_t)
5 5 5 5
m-birke commented 1 week ago

ups : P sry ..

but brings me to this #913