Skip to content

Commit

Permalink
added explanation of how transform works
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Nov 13, 2024
1 parent ea44b2c commit 6b65ab8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sisl/io/siesta/tests/test_tshs.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ def test_tshs_soc_pt2_xx_dtypes(sisl_files, sisl_tmp):
fnc = sisl_tmp("tmp.nc")
for HS in data:
HS.write(f)
HS1 = sisl.physics.Hamiltonian.read(f)
HS1 = HS.read(f)
assert np.allclose(eigs, HS1.eigh(k), atol=1e-5)

HS.write(fnc)
HS1 = sisl.physics.Hamiltonian.read(fnc)
HS1 = HS.read(fnc)
assert np.allclose(eigs, HS1.eigh(k), atol=1e-5)


Expand Down
7 changes: 6 additions & 1 deletion src/sisl/physics/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,6 @@ def _reset(self):
self.M11 = 0
self.M22 = 1
self.M12 = 2
raise NotImplementedError("Currently not implemented")
self.Pk = self._Pk_non_colinear
self.Sk = self._Sk_non_colinear
self.dPk = self._dPk_non_colinear
Expand Down Expand Up @@ -1617,6 +1616,12 @@ def transform(self, matrix=None, dtype=None, spin=None, orthogonal=None):
The transformation matrix does *not* act on the rows and columns, only on the
final dimension of the matrix.
The matrix transformation is done like this:
>>> out = in @ matrix.T
Meaning that ``matrix[0, :]`` will be the factors of the input matrix elements.
Parameters
----------
matrix : array_like, optional
Expand Down

0 comments on commit 6b65ab8

Please sign in to comment.