Preliminary Numpy implementation of dihedral