from typing import List


def gauss_points(
    n: float,
) -> List[List[float]]:
    """Returns the Gaussian weights and locations for *n* point Gaussian integration of
    a linear triangular element.

    :param int n: Number of Gauss points (1, 3 or 6)

    :return: An *n x 3* matrix consisting of the integration weight and the xi and eta
        locations for *n* Gauss points
    :rtype: List[List[float]]
    """

    if n == 1:
        return [[0.5, 1.0 / 3, 1.0 / 3]]
    elif n == 3:
        return [
            [1.0 / 6, 0, 0.5],
            [1.0 / 6, 0.5, 0],
            [1.0 / 6, 0.5, 0.5],
        ]
    else:
        raise ValueError(f"{n} gauss points not implemented.")