def _mkanchors(widths, heights, x_ctr, y_ctr):
    """
    Given a vector of widths (ws) and heights (hs) around a center
    (x_ctr, y_ctr), output a set of anchors (windows).
    """

    widths = widths[:, np.newaxis]
    heights = heights[:, np.newaxis]
    anchors = np.hstack(
        (
            x_ctr - 0.5 * (widths - 1),
            y_ctr - 0.5 * (heights - 1),
            x_ctr + 0.5 * (widths - 1),
            y_ctr + 0.5 * (heights - 1),
        )
    )
    return anchors

    Given a vector of widths (ws) and heights (hs) around a center
    (x_ctr, y_ctr), output a set of anchors (windows).
    
python/aitemplate/frontend/nn/proposal.py