mean() does not support sparse matrices
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
mean() does not support sparse matrices.
After 30 years of existing, a so common function should be usable also with this numerical encoding.
--> s = sprand(20,10,0.5);
--> mean(s)
at line 27 of function mean ( SCI\modules\statistics\macros\mean.sci line 40 )
mean: Function not defined for given argument #1 type.
Check arguments or define function %sp_mean() for overloading.
--> mean(s, "r")
at line 27 of function mean ( SCI\modules\statistics\macros\mean.sci line 40 )
mean: Function not defined for given argument #1 type.
Check arguments or define function %sp_mean() for overloading.
--> mean(s, "c")
at line 27 of function mean ( SCI\modules\statistics\macros\mean.sci line 40 )
mean: Function not defined for given argument #1 type.
Check arguments or define function %sp_mean() for overloading.
ERROR LOG:
----------
See above
HOW TO REPRODUCE THE BUG:
-------------------------
s = sprand(20,10,0.5);
mean(s);
mean(s, "r");
mean(s, "c");
OTHER INFORMATION:
------------------
It was already missing in Scilab 5.