[Scilab-users] undocumented behavior of sum(), prod() and type()

Samuel Gougeon sgougeon at free.fr
Tue Feb 11 11:13:22 CET 2020


Le 11/02/2020 à 02:37, Federico Miyara a écrit :
>
> .../...
> But is there a rationale for sum([])==0 and yet cumsum([])==[]?


We expect a scalar from sum([]), while from cumsum([]) we expect an 
array with the same size than the input array.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200211/ce72ba35/attachment.htm>


More information about the users mailing list