Added distance metric selection capability to kmeans._labels_inertia. Current available metrics are L1 and L2 norm.
Added test to check labels assignment and inertia for L1 norm.
Made test for labels assignment and inertia for L1 norm pass.
Added implementations of L1 norm distance computations for dense and sparse matrices.
Added a function to compute the cluster centers when using the L1 norm (the median of the datapoints in the cluster)).
Added metric selection to sklearn.cluster.KMeans
Added cosine distance measure to KMeans. This just normalises the X vectors to have unit length before they are passed to the k_means function.
PEP8 formatting.
Added a check to _k_init that ignores x_squared_norms if the metric is set the L1 norm.
Merge branch 'l1_sparse' of git://github.com/mattilyra/scikit-learn into l1_sparse
Modifed manhattan_distances to work with sparse matrices.
Modified function docstring for manhattan distances to include information about using the function with sparse matrices.
Added a test to check that manhattan distance handles combinations of sparse input matrices correctly, i.e. converts them to coo matrices.