Reduce 2-argument function f along dimensions of A. dims is a vector specifying the
dimensions to reduce, and the keyword argument init is the initial value to use in the
reductions. For +, *, max and min the init argument is optional.
That said, the error message could be nicer. And there is no reason it could not be extended to xor I guess. Perhaps open an issue?
the solution above stopped working for me somehow - maybe this is usefull for anyone in the future
function (^)(l::BitArray, r::BitArray)
xorArray = BitArray(fill(0, (1,consts.sn)))
for (index, leftValue) = enumerate(l)
if leftValue && !r[index] || !leftValue && r[index]
xorArray[index] = 1
end
end
return xorArray
end