ENH: from_indices can get a scalar for uniform edge weights