Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/aspire/classification/reddy_chatterji.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _phase_cross_correlation(img0, img1):
maxima = np.unravel_index(
np.argmax(np.abs(cross_correlation)), cross_correlation.shape
)
midpoints = np.array([np.fix(axis_size / 2) for axis_size in shape])
midpoints = np.array([np.trunc(axis_size / 2) for axis_size in shape])

shifts = np.array(maxima, dtype=np.float64)
shifts[shifts > midpoints] -= np.array(shape)[shifts > midpoints]
Expand Down
4 changes: 2 additions & 2 deletions src/aspire/covariance/covar2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from time import perf_counter

import numpy as np
from numpy.linalg import eig, inv
from numpy.linalg import eigh, inv
from scipy.linalg import solve, sqrtm

from aspire.basis import Coef, FFBBasis2D
Expand Down Expand Up @@ -30,7 +30,7 @@ def shrink_covar(covar, noise_var, gamma, shrinker="frobenius_norm"):
"soft_threshold",
), "Unsupported shrink method"

lambs, eig_vec = eig(make_symmat(covar))
lambs, eig_vec = eigh(make_symmat(covar))

lambda_max = noise_var * (1 + np.sqrt(gamma)) ** 2

Expand Down