Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Dec 14, 2024
1 parent 8664839 commit 7199ca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/test_spatialstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import xdem
from xdem import examples
from xdem._typing import NDArrayf
from xdem.spatialstats import EmpiricalVariogramKArgs, nmad, neff_hugonnet_approx
from xdem.spatialstats import EmpiricalVariogramKArgs, neff_hugonnet_approx, nmad

with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
Expand Down
6 changes: 2 additions & 4 deletions xdem/spatialstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from scipy.interpolate import RegularGridInterpolator, griddata
from scipy.optimize import curve_fit
from scipy.signal import fftconvolve
from scipy.spatial.distance import pdist, cdist, squareform
from scipy.spatial.distance import cdist, pdist, squareform
from scipy.stats import binned_statistic, binned_statistic_2d, binned_statistic_dd
from skimage.draw import disk

Expand Down Expand Up @@ -2275,9 +2275,7 @@ def neff_hugonnet_approx(
else:
# Vectorized calculation
var = np.sum(
errors.reshape((-1, 1))
@ sub_errors.reshape((1, -1))
* rho(pds_matrix.flatten()).reshape(pds_matrix.shape)
errors.reshape((-1, 1)) @ sub_errors.reshape((1, -1)) * rho(pds_matrix.flatten()).reshape(pds_matrix.shape)
)

# The number of effective sample is the fraction of total sill by squared standard error
Expand Down

0 comments on commit 7199ca3

Please sign in to comment.