Sparse matrix conversion depending on the type of metric

If metric is "manhattan", then store it as csc since calculating
the median is easier.