Additional test, exception output

Former-commit-id: f976b87dae8c38dcfdd810b187fd0089a8287667
This commit is contained in:
Marek Nečada 2017-07-20 15:57:36 +03:00
parent 83a2d56d41
commit 2451da7b3e
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ def change_basis(srcbasis, destbasis, srccoords, srccoordsaxis=-1, lattice=True)
trmatrix = np.round(trmatrix) trmatrix = np.round(trmatrix)
if not np.all(np.isclose(trmatrix, otrmatrix)): if not np.all(np.isclose(trmatrix, otrmatrix)):
raise ValueError("Given srcbasis and destbasis are not bases" 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)) destcoords = np.tensordot(srccoords, trmatrix, axes=(srccoordsaxis, -1))
return destcoords return destcoords