def _loc_to_coil_trans(loc):
    # deal with nasty OSX Anaconda bug by casting to float64
    loc = loc.astype(np.float64)
    coil_trans = np.concatenate([loc.reshape(4, 3).T[:, [1, 2, 3, 0]],
                                 np.array([0, 0, 0, 1]).reshape(1, 4)])
    return coil_trans
Helper to convert loc vector to coil_trans
dataset/ETHPy150Open mne-tools/mne-python/mne/io/tag.py/_loc_to_coil_trans