def center_crop_numpy(img, cropx, cropy):
    """
    Givenn an image numpy array, perform a center crop.

    Args:
        img     : numpy image array
        cropx   : width of crop
        cropy   : height of crop
    
    Returns:
        cropped numpy image array
    """
    y,x = img.shape[:-1]
    startx = x//2-(cropx//2)
    starty = y//2-(cropy//2)
    return img[starty:starty+cropy, startx:startx+cropx, :]