Sparse matrix conversion depending on the type of metric

If metric is "manhattan", then store it as csc since calculating
the median is easier. Else store it as a csr matrix since the
mean is easier because it is row slicing.