Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson committed Aug 27, 2024
1 parent e4abccf commit e9b0e98
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions UnitTests/test_chemistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_matrices(self):
fock = rand(self.mat_dim, self.mat_dim, density=1.0)
if self.is_complex:
fock += 1j * rand(self.mat_dim, self.mat_dim, density=1.0)
fock = fock + fock.H
fock = fock + fock.getH()
else:
fock = fock + fock.T
overlap = rand(self.mat_dim, self.mat_dim, density=1.0)
Expand Down Expand Up @@ -320,7 +320,7 @@ def test_wom_gc(self):
we = [1.0/(1 + exp(beta*(x - mu))) for x in w]

if self.is_complex:
DOrth = v @ diag(we) @ matrix(v).H
DOrth = v @ diag(we) @ matrix(v).getH()
else:
DOrth = v @ diag(we) @ v.T
D = ISQ.dot(DOrth).dot(ISQ)
Expand Down Expand Up @@ -381,7 +381,7 @@ def test_wom_c(self):
while abs(trace(DOrth) - self.nel) > 1e-12:
we = [1.0/(1 + exp(beta*(x - mu))) for x in w]
if self.is_complex:
DOrth = v @ diag(we) @ matrix(v).H
DOrth = v @ diag(we) @ matrix(v).getH()
else:
DOrth = v @ diag(we) @ v.T
D = ISQ.dot(DOrth).dot(ISQ)
Expand Down
6 changes: 3 additions & 3 deletions UnitTests/test_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_readsymmetric(self):
'''Test routines to read and write matrices.'''
for param in self.parameters:
matrix1 = param.create_matrix(complex=self.complex, square=True)
matrix1 = matrix1 + matrix1.H
matrix1 = matrix1 + matrix1.getH()
mmwrite(self.file1, matrix1)
matrix2 = self.SMatrix(self.file1)
matrix2.WriteToMatrixMarket(self.file2)
Expand Down Expand Up @@ -226,7 +226,7 @@ def test_multiply(self):
from random import uniform
for param in self.parameters:
matrix1 = param.create_matrix(complex=self.complex)
matrix2 = param.create_matrix(complex=self.complex).H
matrix2 = param.create_matrix(complex=self.complex).getH()
mmwrite(self.file1, matrix1)
mmwrite(self.file2, matrix2)
alpha = uniform(1.0, 2.0)
Expand Down Expand Up @@ -254,7 +254,7 @@ def test_multiply_nt(self):
from random import uniform
for param in self.parameters:
matrix1 = param.create_matrix(complex=self.complex)
matrix2 = param.create_matrix(complex=self.complex).H
matrix2 = param.create_matrix(complex=self.complex).getH()
mmwrite(self.file1, matrix1)
mmwrite(self.file2, matrix2.T)
alpha = uniform(1.0, 2.0)
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/test_psmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def test_conjugatetranspose(self):
matrix1 = param.create_matrix(self.complex)
self.write_matrix(matrix1, self.input_file1)

self.CheckMat = matrix1.H
self.CheckMat = matrix1.getH()

ntmatrix1 = nt.Matrix_ps(self.input_file1, False)
ntmatrix2 = nt.Matrix_ps(ntmatrix1.GetActualDimension())
Expand Down
4 changes: 2 additions & 2 deletions UnitTests/test_psmatrixalgebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def test_asymmetry(self):
else:
ntmatrix1 = nt.Matrix_ps(param.rows)

diff = matrix1 - matrix1.H
diff = matrix1 - matrix1.getH()
ref = norm(diff.todense(), ord=inf)
comp = ntmatrix1.MeasureAsymmetry()
comm.barrier()
Expand All @@ -320,7 +320,7 @@ def test_symmetrize(self):
else:
ntmatrix1 = nt.Matrix_ps(param.rows)

self.CheckMat = 0.5 * (matrix1 + matrix1.H)
self.CheckMat = 0.5 * (matrix1 + matrix1.getH())
ntmatrix1 = nt.Matrix_ps(self.input_file1, False)
ntmatrix1.Symmetrize()
ntmatrix1.WriteToMatrixMarket(self.result_file)
Expand Down
10 changes: 5 additions & 5 deletions UnitTests/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def test_hornerfunction(self):
val[i] = 0
for j in range(0, len(coef)):
val[i] = val[i] + coef[j] * (temp**j)
temp_poly = dot(dot(vec, diag(val)), vec.H)
temp_poly = dot(dot(vec, diag(val)), vec.getH())
self.CheckMat = csr_matrix(temp_poly)

# Result Matrix
Expand Down Expand Up @@ -702,7 +702,7 @@ def test_patersonstockmeyerfunction(self):
val[i] = 0
for j in range(0, len(coef)):
val[i] = val[i] + coef[j] * (temp**j)
temp_poly = dot(dot(vec, diag(val)), vec.H)
temp_poly = dot(dot(vec, diag(val)), vec.getH())
self.CheckMat = csr_matrix(temp_poly)

# Result Matrix
Expand Down Expand Up @@ -1189,16 +1189,16 @@ def create_matrix(self, SPD=None, scaled=None, diag_dom=None, rank=None,
from numpy import diag
mat = rand(self.mat_dim, self.mat_dim, density=1.0)
mat += 1j * rand(self.mat_dim, self.mat_dim, density=1.0)
mat = mat + mat.H
mat = mat + mat.getH()
if SPD:
mat = mat.H.dot(mat)
mat = mat.getH().dot(mat)
if diag_dom:
identity_matrix = identity(self.mat_dim)
mat = mat + identity_matrix * self.mat_dim
if scaled:
mat = (1.0 / self.mat_dim) * mat
if rank:
mat = mat[rank:].dot(mat[rank:].H)
mat = mat[rank:].dot(mat[rank:].getH())
if add_gap:
w, v = eigh(mat.todense())
gap = (w[-1] - w[0]) / 2.0
Expand Down

0 comments on commit e9b0e98

Please sign in to comment.