Closed gilgamec closed 4 years ago
I think a few of these functions should be extracting a scalar value, allTrue
, anyTrue
, countAll
, but the rest probably not. I'll make a PR to remove this.
@gilgamec this should solve all those issues, tests have been updated to reflect the changes.
The functions which take a dimension to reduce along should return a full matrix, with only that dimension flattened, rather than a single scalar. These are (at least)
sum
,sumNaN
,product
,productNaN
,min
,max
,allTrue
,anyTrue
, andcount
. The correct array is being computed by the FFI, but thegetScalar
function is being applied and just extracts the first element, rather than returning the entire array. The current behaviour of (for instance)sum
isas opposed to the expected output,
and