def cut_window(image, window):
    """
    Returns image cropped to window.
    
    Window should be a list of lists like this - [[miny, maxy],[minx, maxx]]
    """
    
    return image[window[0][0]: window[0][1] + 1, window[1][0]: window[1][1] + 1].copy()