matrix(sparse([]), [0 0]) returns [] instead of sparse([])
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
matrix(sparse([]), [0 0]) returns [] instead of sparse([]):
--> matrix(sparse([]),[0 0])
ans =
[]
As well:
--> esb = sparse(%f); esb(1)=[]
esb =
( 0, 0)empty sparse boolean matrix
--> matrix(esb,[0 0])
ans =
[]
These are next useless complications coming from typing [] for sparses.
ERROR LOG:
----------
HOW TO REPRODUCE THE BUG:
-------------------------
issparse(matrix(sparse([]),[0 0]))
esb = sparse(%f); esb(1)=[];
issparse(matrix(esb,[0 0]))
OTHER INFORMATION:
------------------
IMO typing [] introduced for sparses in 6.0.2 should be reverted, instead.