Skip to content

Commit 1993e59

Browse files
committed
[BUG FIX] Matrix must be hermitian.
1 parent f7c972b commit 1993e59

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

EXAMPLES/PYARPACK/pyarpackDenseLDLT.py.in

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ for k in range(n):
1313
Aij = np.append(Aij, np.complex128(complex( 200., 200.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
1414
elif l == k-1:
1515
Aij = np.append(Aij, np.complex128(complex(-101., -101.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
16-
elif l == k+1:
17-
Aij = np.append(Aij, np.complex128(complex( -99., -99.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
16+
elif l == k+1: # Note: matrix must be hermitian.
17+
Aij = np.append(Aij, np.complex128(complex(-101., 101.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
1818
else:
1919
Aij = np.append(Aij, np.complex128(complex( 0., 0.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
2020
for idx, val in enumerate(Aij):
@@ -70,9 +70,9 @@ for k in range(n):
7070
elif l == k-1:
7171
Aij = np.append(Aij, np.complex64(complex(-101., -101.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
7272
Bij = np.append(Bij, np.complex64(complex( 16.6, 16.6))) # Casting value on append is MANDATORY or C++ won't get the expected type.
73-
elif l == k+1:
74-
Aij = np.append(Aij, np.complex64(complex( -99., -99.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
75-
Bij = np.append(Bij, np.complex64(complex( 16.6, 16.6))) # Casting value on append is MANDATORY or C++ won't get the expected type.
73+
elif l == k+1: # Note: matrix must be hermitian.
74+
Aij = np.append(Aij, np.complex64(complex(-101., 101.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
75+
Bij = np.append(Bij, np.complex64(complex( 16.6, -16.6))) # Casting value on append is MANDATORY or C++ won't get the expected type.
7676
else:
7777
Aij = np.append(Aij, np.complex64(complex( 0., 0.))) # Casting value on append is MANDATORY or C++ won't get the expected type.
7878
Bij = np.append(Bij, np.complex64(complex( 0., 0.))) # Casting value on append is MANDATORY or C++ won't get the expected type.

0 commit comments

Comments
 (0)