min(sparse([],[])) returns 0 instead of []. Same issue with max()
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
From Scilab 4.1.2 to 6.0.1:
-->min([])
ans =
[]
-->min([],"r")
ans =
[]
-->min([],"c")
ans =
[]
BUT
-->min(sparse([],[]))
ans =
0. ==> [] expected
In Scilab 6.0:
--> min(sparse([],[]),"r")
ans =
( 1, 0) zero sparse matrix ==> [] expected
--> min(sparse([],[]),"c")
ans =
( 0, 1) zero sparse matrix ==> [] expected
For both last cases, a true [] would be clearer and simpler to manage.
These variations around the sparse empty look useless and awkward.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
min([])
min([],"r")
min([],"c")
// versus
min(sparse([],[]))
min(sparse([],[]),"r")
min(sparse([],[]),"c")