def _read_dig_points(fname, comments='%'):
    """Read digitizer data from a text file.

    This function can read space-delimited text files of digitizer data.

    Parameters
    ----------
    fname : str
        The filepath of space delimited file with points.
    comments : str
        The character used to indicate the start of a comment;
        Default: '%'.

    Returns
    -------
    dig_points : np.ndarray, shape (n_points, 3)
        Array of dig points.
    """
    dig_points = np.loadtxt(fname, comments=comments, ndmin=2)
    if dig_points.shape[-1] != 3:
        err = 'Data must be (n, 3) instead of %s' % (dig_points.shape,)
        raise ValueError(err)

    return dig_points
dataset/ETHPy150Open mne-tools/mne-python/mne/io/meas_info.py/_read_dig_points/original