small renaming for type consistency

This commit is contained in:
Justus Kuhlmann 2025-11-04 09:36:10 +00:00
commit 38df83344b

View file

@ -52,10 +52,10 @@ def matrix_pencil_method(corrs: list[Obs], k: int=1, p: Optional[int]=None, **kw
matrix = [] matrix = []
for n in range(data_sets): for n in range(data_sets):
matrix.append(scipy.linalg.hankel(data[n][:n_data - p], data[n][n_data - p - 1:])) matrix.append(scipy.linalg.hankel(data[n][:n_data - p], data[n][n_data - p - 1:]))
matrix = np.array(matrix) matrix_array = np.array(matrix)
# Construct y1 and y2 # Construct y1 and y2
y1 = np.concatenate(matrix[:, :, :p]) y1 = np.concatenate(matrix_array[:, :, :p])
y2 = np.concatenate(matrix[:, :, 1:]) y2 = np.concatenate(matrix_array[:, :, 1:])
# Apply SVD to y2 # Apply SVD to y2
u, s, vh = svd(y2, **kwargs) u, s, vh = svd(y2, **kwargs)
# Construct z from y1 and SVD of y2, setting all singular values beyond the kth to zero # Construct z from y1 and SVD of y2, setting all singular values beyond the kth to zero