Instead of failing with an uncaught exception like the following:
ValueError: perplexity must be less than n_samples
the t-SNE embedding should compare the number of samples in the input distance matrix to the perplexity and let the user know how to fix the error.
Another option would be to automatically use the minimum of the requested perplexity and given number of samples while printing a warning to the user. This approach would allow the embedding to run in most cases except when there are fewer than 2 samples.