Since Octave's sum() function now correctly and compatibly processes empty arrays and dimensions without throwing errors, this manual workaround is no longer required. We can safely remove the special if block for szx == [0,0].
Example: Before the change, the special case explicitly assigned an empty NaN array:
octave:1> geomean([])
ans = [](1x0)
After removing the special case block, the underlying standard implementation natively produces the identical:
octave:1> geomean([])
ans = [](1x0)
Since Octave's
sum()function now correctly and compatibly processes empty arrays and dimensions without throwing errors, this manual workaround is no longer required. We can safely remove the special if block forszx == [0,0].Example: Before the change, the special case explicitly assigned an empty NaN array:
After removing the special case block, the underlying standard implementation natively produces the identical: