From 5249978f4541435f9dc950f621d1decf42b48f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sat, 8 Jul 2017 10:39:49 +0300 Subject: [PATCH] Error messages Former-commit-id: 7da5d92e9022ab90989333990b4ed4193540f70c --- misc/generaldisp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/generaldisp.py b/misc/generaldisp.py index 79f83b5..52bd5d7 100755 --- a/misc/generaldisp.py +++ b/misc/generaldisp.py @@ -244,7 +244,7 @@ for op in ops: TMatrix_contribs[i] = qpms.apply_matrix_left(rot,qpms.apply_matrix_left(rotinv, TMatrices[:,t], -3),-1) TMatrices[:,t] = np.sum(TMatrix_contribs, axis=0) / rotN else: - raise + raise ValueError('\'%d\' is not an implemented symmetry operation' % op[2]) elif op[1] == 'tr': mCN = reCN.match(op[2]) # Fuck van Rossum for not having assignments inside expressions if op[2] == 'σ_z': @@ -269,7 +269,7 @@ for op in ops: rotinv = qpms.WignerD_yy_fromvector(lMax, np.array([0,0,-rotangle])) TMatrices[:,t] = qpms.apply_matrix_left(rot, qpms.apply_matrix_left(rotinv, TMatrices[:,t], -3),-1) else: - raise + raise ValueError('\'%d\' is not an implemented T-matrix transformation operation' % op[2]) elif op[1] == 'copy': raise # not implemented elif op[1] == 'mult':