def tril(m, k=0):
 m = np.asarray(m)
 out = (tri(m.shape[0], m.shape[1], k=k, dtype=m.dtype.char) * m)
 return out

def tril ( m , k = 0 ) : m = np . asarray ( m ) out = ( tri ( m . shape [ 0 ] , m . shape [ 1 ] , k = k , dtype = m . dtype . char ) * m ) return out
return the lower triangular portion of a matrix in sparse format returns the elements on or below the k-th diagonal of the matrix a .