Skip to content

Commit

Permalink
Replace median for mean
Browse files Browse the repository at this point in the history
Use the mean to compute the average distance of neighboring data points.
  • Loading branch information
santisoler committed May 14, 2024
1 parent f1138f9 commit 61a3265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion harmonica/_equivalent_sources/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def _build_points(self, coordinates):
if self.block_size is not None:
coordinates = self._block_average_coordinates(coordinates)
if self.depth == "default":
self.depth_ = 4.5 * np.median(vd.median_distance(coordinates, k_nearest=1))
self.depth_ = 4.5 * np.mean(vd.median_distance(coordinates, k_nearest=1))
else:
self.depth_ = self.depth
return (
Expand Down

0 comments on commit 61a3265

Please sign in to comment.