def calc_tristimulus_array_length(data_array):
    """
    calcurate the array length of tristimulus ndarray.

    Parameters
    ----------
    data_array : ndarray
        tristimulus values

    Returns
    -------
    int
        length of the tristimulus array.

    Examples
    --------
    >>> data_1 = np.ones((3, 4, 3))
    >>> calc_tristimulus_array_length(data_array=data_1)
    12
    >>> data_2 = np.ones((3))
    >>> calc_tristimulus_array_length(data_array=data_2)
    1
    """
    length = 1
    for coef in data_array.shape[:-1]:
        length = length * coef

    return length