def max_shape(list_of_arrays):
    """Return the maximum m and n of a list of arrays. This is useful when reshaping arrays to a standard shape before combining to a 3D array."""
    m = max([i.shape[0] for i in list_of_arrays])
    n = max([i.shape[1] for i in list_of_arrays])
    return(m, n)