Additional test, exception output
Former-commit-id: f976b87dae8c38dcfdd810b187fd0089a8287667
This commit is contained in:
parent
83a2d56d41
commit
2451da7b3e
|
@ -245,7 +245,7 @@ def change_basis(srcbasis, destbasis, srccoords, srccoordsaxis=-1, lattice=True)
|
|||
trmatrix = np.round(trmatrix)
|
||||
if not np.all(np.isclose(trmatrix, otrmatrix)):
|
||||
raise ValueError("Given srcbasis and destbasis are not bases"
|
||||
"of the same lattice", srcbasis, destbasis)
|
||||
"of the same lattice", srcbasis, destbasis, trmatrix-otrmatrix)
|
||||
destcoords = np.tensordot(srccoords, trmatrix, axes=(srccoordsaxis, -1))
|
||||
return destcoords
|
||||
|
||||
|
|
Loading…
Reference in New Issue