def first_dimension_length(array):
    """Returns the length of the first dimension of the provided array or list.

    Args:
        array (list or numpy.ndarray): An array.

    Returns:
        int: The length of the first dimension of the array.
    """
    if type(array) is list:
        return len(array)
    else:
        return array.shape[0]