Generate a lil_matrix with the given diagonals.
Parameters : | diags : list of list of values e.g. [[1,2,3],[4,5]]
offsets : list of ints
(r,c) : tuple of ints
dtype : dtype
|
---|
Examples
>>> lil_diags([[1,2,3],[4,5],[6]],[0,1,2],(3,3)).todense()
matrix([[ 1., 4., 6.],
[ 0., 2., 5.],
[ 0., 0., 3.]])