Skip to content

Commit

Permalink
Merge branch 'main' into extend-py-3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
santisoler authored Jun 18, 2024
2 parents 1e6daf8 + f6d52b9 commit ef159b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion harmonica/_equivalent_sources/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def fit(self, coordinates, data, weights=None):
self.region_ = vd.get_region(coordinates[:2])
coordinates = vdb.n_1d_arrays(coordinates, 3)
if self.points is None:
self.points_ = self._build_points(coordinates)
self.points_ = tuple(
p.astype(self.dtype) for p in self._build_points(coordinates)
)
else:
self.depth_ = None # set depth_ to None so we don't leave it unset
self.points_ = tuple(
Expand Down
4 changes: 3 additions & 1 deletion harmonica/_equivalent_sources/gradient_boosted.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ def fit(self, coordinates, data, weights=None):
weights = weights.ravel()
# Build point sources
if self.points is None:
self.points_ = self._build_points(coordinates)
self.points_ = tuple(
p.astype(self.dtype) for p in self._build_points(coordinates)
)
else:
self.points_ = tuple(
p.astype(self.dtype) for p in vdb.n_1d_arrays(self.points, 3)
Expand Down

0 comments on commit ef159b6

Please sign in to comment.