def array_with_new_shape(array, new_shape):
    """Resize an input array around its centre to a new input shape.

    If a new_shape dimension is smaller than the array's current dimension, the data at the edges is trimmed and
    removedd. If it is larger, the data is padded with zeros.

    If the array has even sized dimensions, the central pixel around which data is trimmed / padded is chosen as
    the top-left pixel of the central quadrant of pixels.

    Parameters
    -----------
    array : aa.Array
        The array which is trimmed / padded to a new 2D shape.
    new_shape : (int, int)
        The new 2D shape of the array.
    """
    return array.resized_from_new_shape(new_shape=new_shape)
