[BUG?] safe_asarray fails for dok_matrix and lil_matrix

safe_asarray doesn't like dok_matrix or lil_matrix, because dok_matrix does not expose .data and lil_matrix exposes .data weirdly (array of dtype object, list of not necessarily equally sized lists).