So, indeed...
"Y : A condensed or redundant distance matrix. A condensed distance matrix is a flat array containing the upper triangular of the distance matrix. This is the form that pdist returns. Alternatively, a collection of m observation vectors in n dimensions may be passed as an m by n array." (Y being the input).

I'll add a comment, and I'll remove the change of the affinity option: the ``metrics`` option is only used when the input is not of the form that pdist returns (ie, a ndarray of shape 1).