Translocations_Detector/util/seg_ops.py
def seg_length(segments):
    """
    Computes the lengths of a set of bounding segments, which are specified by its
    (x1, x2) coordinates.

    Arguments:
        segments (Tensor[N, 2]): segments for which the length will be computed. They
            are expected to be in (x1 x2) format

    Returns:
        length (Tensor[N]): length for each segment
    """
    return segments[:, 1] - segments[:, 0]

    Computes the lengths of a set of bounding segments, which are specified by its
    (x1, x2) coordinates.

    Arguments:
        segments (Tensor[N, 2]): segments for which the length will be computed. They
            are expected to be in (x1 x2) format

    Returns:
        length (Tensor[N]): length for each segment
    
Computes the lengths of a set of bounding segments, which are specified by its
(x1, x2) coordinates.
Computes the lengths of a set of bounding segments which are specified by its ( x1 x2 ) coordinates .
def seg_length(segments):
    return segments[:, 1] - segments[:, 0]
def seg_length ( segments ) : return segments [ : , 1 ] - segments [ : , 0 ]
Computes the lengths of a set of bounding segments, which are specified by its
(x1, x2) coordinates.
Computes the lengths of a set of bounding segments which are specified by its ( x1 x2 ) coordinates .
"""
    Computes the lengths of a set of bounding segments, which are specified by its
    (x1, x2) coordinates.

    Arguments:
        segments (Tensor[N, 2]): segments for which the length will be computed. They
            are expected to be in (x1 x2) format

    Returns:
        length (Tensor[N]): length for each segment
    """
length (Tensor[N]): length for each segment
length ( Tensor [ N ] ) : length for each segment
segments
segments for which the length will be computed. They
are expected to be in (x1 x2) format
segments for which the length will be computed . They are expected to be in ( x1 x2 ) format