Skip to content

Commit a16c4ec

Browse files
committed
Fix type conversion in correlation length calculation
1 parent 0d50a52 commit a16c4ec

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

varipeps/corrlength/corrlength.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ def calculate_correlation_length(unitcell: PEPS_Unit_Cell):
6464
initial_vector_bottom = initial_vector_bottom.reshape(-1)
6565

6666
eig_right, eigvec_right = eigs(
67-
full_transfer_right, k=5, v0=initial_vector_right, which="LM"
67+
np.asarray(full_transfer_right),
68+
k=5,
69+
v0=np.asarray(initial_vector_right),
70+
which="LM",
6871
)
6972

7073
eig_right = np.abs(eig_right)
@@ -73,7 +76,10 @@ def calculate_correlation_length(unitcell: PEPS_Unit_Cell):
7376
corr_len_right = -1 / np.log(eig_right[1])
7477

7578
eig_bottom, eigvec_bottom = eigs(
76-
full_transfer_bottom, k=5, v0=initial_vector_bottom, which="LM"
79+
np.asarray(full_transfer_bottom),
80+
k=5,
81+
v0=np.asarray(initial_vector_bottom),
82+
which="LM",
7783
)
7884

7985
eig_bottom = np.abs(eig_bottom)

0 commit comments

Comments
 (0)