def num_obs_y(Y):
Y = np.asarray(Y, order='<STR_LIT:c>')<EOL>is_valid_y(Y, throw=True, name='<STR_LIT:Y>')<EOL>k = Y.shape[<NUM_LIT:0>]<EOL>if k == <NUM_LIT:0>:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>d = int(np.ceil(np.sqrt(k * <NUM_LIT:2>)))<EOL>if (d * (d - <NUM_LIT:1>) / <NUM_LIT:2>) != k:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>return d<EOL>
Returns the number of original observations that correspond to a
condensed distance matrix.

Parameters
----------
Y : ndarray
    Condensed distance matrix.

Returns
-------
n : int
    The number of observations in the condensed distance matrix `Y`.