def image_center_crop(img):
    """
    Makes a square center crop of an img, which is a [h, w, 3] numpy array.
    Returns [min(h, w), min(h, w), 3] output with same width and height.
    For cropping use numpy slicing.
    """
    h, w, c = img.shape
    if h > w:
        cropped_h_length = (h - w) / 2
        cropped_img = img[cropped_h_length:(w+cropped_h_length), :, :]
    else:
        cropped_w_length = (w - h) / 2
        cropped_img = img[:, cropped_w_length:(h+cropped_w_length), :] 
    
    return cropped_img