<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def databiv (xy, coordouter=False, **kwargs):
 """Compute the main parameters of a bivariate distribution from data. The parameters are returned in the same format as used in the rest of this module. * xy: a 2D data array of shape (2, nsamp) or (nsamp, 2) * coordouter: if True, the coordinate axis is the outer axis; i.e. the shape is (2, nsamp). Otherwise, the coordinate axis is the inner axis; i.e. shape is (nsamp, 2). Returns: (sx, sy, cxy) In both cases, the first slice along the coordinate axis gives the X data (i.e., xy[0] or xy[:,0]) and the second slice gives the Y data (xy[1] or xy[:,1]). """

    xy = np.asarray (xy)
    if xy.ndim != 2:
        raise ValueError ('"xy" must be a 2D array')

    if coordouter:
        if xy.shape[0] != 2:
            raise ValueError ('if "coordouter" is True, first axis of "xy" '
                              'must have size 2')
    else:
        if xy.shape[1] != 2:
            raise ValueError ('if "coordouter" is False, second axis of "xy" '
                              'must have size 2')

    cov = np.cov (xy, rowvar=coordouter, **kwargs)
    sx, sy = np.sqrt (np.diag (cov))
    cxy = cov[0,1]
    return _bivcheck (sx, sy, cxy)