def _get_resizing_factors(src_shape: tuple[int, ...],
                          dst_shape: tuple[int, ...]) -> tuple[float, ...]:
    """Determine how much each axis is resized by."""
    # The ternary is a quick fix for cases where there are dimensions
    # of length one. It may cause weird effects, so a more thoughtful
    # fix would be good in the future.
    src_ends = [n - 1 if n != 1 else 1 for n in src_shape]
    dst_ends = [n - 1 if n != 1 else 1 for n in dst_shape]
    factors = tuple(d / s for s, d in zip(src_ends, dst_ends))
    return factors